Beispiel #1
0
 void Update()
 {
     if (Time.frameCount == 5)
     {
         MojingSDK.Unity_StartBacker(1024, 1024, info, info.Length);
         if (false == startmake)
         {
             startmake = true;
         }
     }
     if (Time.frameCount > 10)
     {
         bool bret = MojingSDK.Unity_GetBackerTexID(ref tid);
         if (bret)
         {
             // Debug.Log("Unity_GetBackerTexID    " + tid);
             a[2]            = Texture2D.CreateExternalTexture(1024, 1024, TextureFormat.RGB24, false, true, new IntPtr(tid));
             a[2].filterMode = FilterMode.Trilinear;
             GetComponent <Renderer>().material.mainTexture = a[2];
         }
     }
     mcount++;
 }