Exemple #1
0
    private void OnFileLoaded(params object[] args)
    {
        MaterialAsset x = args[0] as MaterialAsset;

        if (x == null)
        {
            return;
        }
        this.oSelfAsset = x;
        if (this.matchMono is SkinMeshLoader)
        {
            SkinMeshLoader skinMeshLoader = this.matchMono as SkinMeshLoader;
            if (skinMeshLoader != null)
            {
                skinMeshLoader.CombineRender(this.oSelfAsset);
            }
        }
        else if (this.matchMono is MeshLoader)
        {
            MeshLoader meshLoader = this.matchMono as MeshLoader;
            if (meshLoader != null)
            {
                meshLoader.CombineRender(this.oSelfAsset);
            }
        }
    }
Exemple #2
0
 private void LoadAsset(string strMeshName)
 {
     if (SkinMeshLoader.monLoadAsset != null)
     {
         SkinMeshLoader.monLoadAsset(strMeshName, new AssetCallBack(this.OnFileLoaded));
     }
     else
     {
         UnityEngine.Object @object = Resources.Load(this.strAssetName);
         this.OnFileLoaded(new object[]
         {
             @object
         });
     }
 }