hecomi / uDesktopDuplication

Desktop Duplication API implementation for Unity (only for Windows 8/10)
http://tips.hecomi.com/entry/2016/12/04/125641
MIT License
557 stars 97 forks source link

Unity5.6.3f1でPropertyToIDがおこられる #26

Closed TsubokuLab closed 5 years ago

TsubokuLab commented 5 years ago

Unity5.x系だとTexture.csのPropertyToIDで怒られる? StartかAwakeで初期化すれば問題なかった。

PropertyToID is not allowed to be called from a MonoBehaviour constructor (or instance field initializer), call it in Awake or Start instead. Called from MonoBehaviour 'Texture' on game object 'Monitor Board'. See "Script Serialization" page in the Unity Manual for further details. UnityEngine.Shader:PropertyToID(String) uDesktopDuplication.Texture:.ctor() (at Assets/uDesktopDuplication/Scripts/Texture.cs:286)

hecomi commented 5 years ago

ご報告ありがとうございます!