コード例 #1
0
        private void createCustomRectPreview()
        {
            GameObject customRectPreviewGameObject = GameObject.Find("[Gif Creator] Custom Rect Preview");

            if (customRectPreviewGameObject == null)
            {
                customRectPreviewGameObject           = new GameObject("[Gif Creator] Custom Rect Preview");
                customRectPreviewGameObject.hideFlags = HideFlags.HideAndDontSave | HideFlags.HideInInspector;
            }

            CustomRectPreview customRectPreview = customRectPreviewGameObject.GetComponent <CustomRectPreview>();

            if (customRectPreview == null)
            {
                customRectPreview = customRectPreviewGameObject.AddComponent <CustomRectPreview>();
            }

            CustomRectPreview.Singleton = customRectPreview;
        }
コード例 #2
0
 public void OnEnable()
 {
     Singleton = this;
 }