Пример #1
0
        protected bool IsMaterialVersionMatched(Material material)
        {
            var materialVersion    = material.GetVector("_ShaderVersion");
            var materialVersionNum = VersionDescriptor.ConvertToSingleInt((int)materialVersion.x, (int)materialVersion.y, (int)materialVersion.z);

            return(materialVersionNum >= fromTargetVersion && materialVersionNum <= toTargetVersion);
        }
Пример #2
0
        static KamakuraShaderGUI()
        {
            var verGuids = AssetDatabase.FindAssets("t:kayac.visualarts.versiondescriptor");

            if (verGuids.Length == 1)
            {
                var path = AssetDatabase.GUIDToAssetPath(verGuids[0]);
                Version = AssetDatabase.LoadAssetAtPath <VersionDescriptor>(path);
            }
            else
            {
                Version = new VersionDescriptor();
                Version.SetVersion(1, 0, 3);
            }
        }
Пример #3
0
 public PatchModule01(AssetProvider assetProvider) : base(assetProvider)
 {
     _fromTargetVersion = VersionDescriptor.ConvertToSingleInt(0, 0, 0);
     _toTargetVersion   = VersionDescriptor.ConvertToSingleInt(1, 0, 7);
 }