예제 #1
0
 protected override bool OnLoad()
 {
     if (index >= 0)
     {
         if (glTFObject.textures.Count <= index)
         {
             Debug.LogWarning("Attempted to get texture index " + index + " when only " + glTFObject.textures.Count + " exist");
             return(false);
         }
         else
         {
             Reference = glTFObject.textures[index];
         }
     }
     return(true);
 }
예제 #2
0
            // hkyoo
            public ImportTask(GLTFTexture texture, GLTFImage.ImportTask imageTask) : base(imageTask)
            {
                Debug.Log("Start ImportTask");
                task = new Task(() => {
                    if (texture == null)
                    {
                        Debug.Log("ImportTask texture is null");
                        return;
                    }

                    Result = new ImportResult[1];
                    for (int i = 0; i < Result.Length; i++)
                    {
                        Result[i] = texture.Import(imageTask.Result);
                        Debug.Log("ImportResult: " + Result[i]);
                    }
                });
            }