diff --git a/Assets/Scripts/Studio/AssetTool/FBXFileManager.cs b/Assets/Scripts/Studio/AssetTool/FBXFileManager.cs index dd27aff6..b5a05925 100644 --- a/Assets/Scripts/Studio/AssetTool/FBXFileManager.cs +++ b/Assets/Scripts/Studio/AssetTool/FBXFileManager.cs @@ -85,6 +85,7 @@ namespace Studio.AssetTool assetData.LoadLocalFBX(file); yield return new WaitUntil(() => (assetData.isLoadComplete == true && assetData.progress == 1) || assetData.isLoadError == true); + assetData.OnLoadComplete(); Texture2D thumbnail = RuntimePreviewGenerator.GenerateModelPreview(assetData.loadedObject.transform, 320, 200); thumbnail = TextureUtil.MakeReadableTexture(thumbnail); @@ -218,6 +219,7 @@ namespace Studio.AssetTool assetData.loadedObject = modelData.LoadModelData(sharedMaterial); assetData.thumbnail = thumbnail; + assetData.OnLoadComplete(); OnLoadComplete(assetData); //assetData.onLoadProgress.RemoveAllListeners(); @@ -226,7 +228,6 @@ namespace Studio.AssetTool void OnLoadComplete(CustomAssetData assetData) { - assetData.OnLoadComplete(); string folderName = assetData.folderName; dataRepo.Add(assetData); //listAssets.Add(assetData); diff --git a/Assets/Scripts/Studio/DataStructures/CustomAssetData.cs b/Assets/Scripts/Studio/DataStructures/CustomAssetData.cs index 57ecad56..0c239219 100644 --- a/Assets/Scripts/Studio/DataStructures/CustomAssetData.cs +++ b/Assets/Scripts/Studio/DataStructures/CustomAssetData.cs @@ -123,6 +123,9 @@ namespace Studio.Util } } mat.enableInstancing = true; + var color = mat.color; + color.a = 1f; + mat.color = color; materials.Add(mat); } renderer.sharedMaterials = materials.ToArray();