Esempio n. 1
0
 private void GenerateShadow(ShadowGenerator myTarget)
 {
     if (Selection.gameObjects.Length > 1)
     {
         for (int i = 0; i < Selection.gameObjects.Length; i++)
         {
             if (Selection.gameObjects[i].GetComponent <ShadowGenerator>())
             {
                 Selection.gameObjects[i].GetComponent <ShadowGenerator>().GenerateShadowFromImage();
             }
         }
     }
     else
     {
         m_IsGenerating = true;
         Repaint();
         myTarget.GetComponent <ShadowGenerator>().GenerateShadowFromImage();
         EditorCoroutine.Start(WaitUntilGeneratorFinishRoutine(myTarget, () =>
         {
             m_IsGenerating = false;
             Repaint();
         }));
     }
 }
Esempio n. 2
0
 public void DownloadIcons(Action onDoneDownloading = null)
 {
     this.m_OnDoneDownloading = onDoneDownloading;
     EditorCoroutine.Start(DownloadIconFontCoroutine());
 }
Esempio n. 3
0
		public static EditorCoroutine Start(IEnumerator routine)
		{
			EditorCoroutine coroutine = new EditorCoroutine(routine);
			coroutine.Start();
			return coroutine;
		}