Пример #1
0
    public override void Redo()
    {
        VCMaterial old_mat  = VCEditor.s_Scene.m_IsoData.m_Materials[m_Index];
        VCMaterial new_mat  = VCEAssetMgr.GetMaterial(m_NewMat);
        ulong      old_guid = (old_mat == null) ? (0) : (old_mat.m_Guid);
        ulong      new_guid = (new_mat == null) ? (0) : (new_mat.m_Guid);

        if (old_guid != new_guid)
        {
            VCEditor.s_Scene.m_IsoData.m_Materials[m_Index] = new_mat;
            VCEditor.s_Scene.GenerateIsoMat();
        }
    }
Пример #2
0
 bool CheckExist(out string warning)
 {
     warning = "";
     if (m_Target != null && m_Target.m_Guid == m_TempMaterial.m_Guid)
     {
         warning = "";
         return(true);
     }
     if (VCEAssetMgr.GetMaterial(m_TempMaterial.m_Guid) != null)
     {
         warning = "The same material already exist".ToLocalizationString() + " !";
         return(true);
     }
     return(false);
 }