Example #1
0
 public void RefreshReferenceRNames(EngineNS.UISystem.UVAnim uvAnim)
 {
     // 资源引用
     ReferenceRNameList.Clear();
     ReferenceRNameList.Add(uvAnim.TextureRName);
     ReferenceRNameList.Add(uvAnim.MaterialInstanceRName);
 }
Example #2
0
 public void RefreshReferenceRNames(EngineNS.Graphics.Mesh.CGfxMesh mesh)
 {
     // 刷新引用
     ReferenceRNameList.Clear();
     ReferenceRNameList.Add(mesh.MeshPrimitiveName);
     foreach (var matName in mesh.MaterialNames)
     {
         ReferenceRNameList.Add(matName);
     }
 }
 public void RefreshReferenceRNames(EngineNS.Graphics.CGfxMaterialInstance matIns)
 {
     // 刷新资源引用
     ReferenceRNameList.Clear();
     ReferenceRNameList.Add(matIns.MaterialName);
     for (UInt32 i = 0; i < matIns.SRVNumber; i++)
     {
         var rName = matIns.GetSRVName(i);
         ReferenceRNameList.Add(rName);
     }
 }
 public void RefreshReferenceRNames(EngineNS.Graphics.CGfxMaterial mat)
 {
     // 资源引用刷新
     ReferenceRNameList.Clear();
     foreach (var param in mat.ParamList)
     {
         switch (param.VarType)
         {
         case EngineNS.EShaderVarType.SVT_Texture:
         case EngineNS.EShaderVarType.SVT_Sampler:
         {
             ReferenceRNameList.Add(param.TextureRName);
         }
         break;
         }
     }
 }
        public async System.Threading.Tasks.Task RefreshReferenceRNames(EngineNS.GamePlay.Actor.GPrefab prefab)
        {
            // 刷新资源引用
            ReferenceRNameList.Clear();

            HashSet <RName> refObjectHashSet = new HashSet <RName>();
            await EngineNS.GamePlay.Actor.GActor.AnalysisActorRefResource(prefab, refObjectHashSet, null);

            foreach (var i in refObjectHashSet)
            {
                if (i.Name.EndsWith(".shadingenv"))
                {
                    continue;
                }
                ReferenceRNameList.Add(i);
            }
        }