コード例 #1
0
        static void CheckMeshDataAsset(ref long meshID, IvyDataAsset myAsset, IvyProfile.MeshCompression meshCompress)
        {
            if (meshID == 0)
            {
                meshID = IvyRoot.GetRandomLong();
            }
            if (!myAsset.meshList.ContainsKey(meshID) || myAsset.meshList[meshID] == null)
            {
                var newMesh = new Mesh();
                MeshUtility.SetMeshCompression(newMesh, (ModelImporterMeshCompression)meshCompress);
                AssetDatabase.AddObjectToAsset(newMesh, AssetDatabase.GetAssetPath(myAsset));

                if (myAsset.meshList.ContainsKey(meshID) && myAsset.meshList[meshID] == null)
                {
                    myAsset.meshList[meshID] = newMesh;
                }
                else
                {
                    myAsset.meshList.Add(meshID, newMesh);
                }
            }
        }
コード例 #2
0
ファイル: IvyData.cs プロジェクト: xiongxingplus/hedera
 public IvyGraph()
 {
     branchMeshID = IvyRoot.GetRandomLong();
     leafMeshID   = IvyRoot.GetRandomLong();
 }