Guest User

Untitled

a guest
Oct 20th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.00 KB | None | 0 0
  1. Get the darn light baking progress:
  2.  
  3.         public IEnumerator TrackProgress()
  4.         {
  5.             /*
  6.             AsyncOperation async = (AsyncOperation)Lightmapping;
  7.             while (async.progress < 1f &&
  8.                 !async.isDone)
  9.             {
  10.                 m_progress = async.progress;
  11.                 yield return async;
  12.             }
  13.             m_progress = 1f;
  14.             yield break;
  15.             */
  16.  
  17.             Type type = typeof(Lightmapping);
  18.             foreach (FieldInfo fi in type.GetFields())
  19.             {
  20.                 Debug.Log(string.Format("Detected field: {0}", fi.Name));
  21.             }
  22.  
  23.             foreach (PropertyInfo pi in type.GetProperties())
  24.             {
  25.                 Debug.Log(string.Format("Detected property: {0}", pi.Name));
  26.             }
  27.  
  28.             foreach (MethodInfo mi in type.GetMethods())
  29.             {
  30.                 Debug.Log(string.Format("Detected method: {0}", mi.Name));
  31.             }
  32.  
  33.             yield break;
  34.         }
Add Comment
Please, Sign In to add comment