mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
Merge branch '4.0' into 4.1-beta
This commit is contained in:
commit
8dc4ee4a6e
@ -625,18 +625,23 @@ namespace Spine.Unity.Editor {
|
||||
if (material == null) {
|
||||
Shader defaultShader = Shader.Find(SpineEditorUtilities.Preferences.DefaultShader);
|
||||
material = defaultShader != null ? new Material(defaultShader) : null;
|
||||
ApplyPMAOrStraightAlphaSettings(material, SpineEditorUtilities.Preferences.textureSettingsReference);
|
||||
AssetDatabase.CreateAsset(material, materialPath);
|
||||
if (material) {
|
||||
ApplyPMAOrStraightAlphaSettings(material, SpineEditorUtilities.Preferences.textureSettingsReference);
|
||||
AssetDatabase.CreateAsset(material, materialPath);
|
||||
}
|
||||
} else {
|
||||
vestigialMaterials.Remove(material);
|
||||
}
|
||||
|
||||
if (texture != null)
|
||||
material.mainTexture = texture;
|
||||
if (material != null) {
|
||||
if (texture != null) {
|
||||
material.mainTexture = texture;
|
||||
}
|
||||
|
||||
EditorUtility.SetDirty(material);
|
||||
// note: don't call AssetDatabase.SaveAssets() since this would trigger OnPostprocessAllAssets() every time unnecessarily.
|
||||
populatingMaterials.Add(material); //atlasAsset.materials[i] = mat;
|
||||
EditorUtility.SetDirty(material);
|
||||
// note: don't call AssetDatabase.SaveAssets() since this would trigger OnPostprocessAllAssets() every time unnecessarily.
|
||||
populatingMaterials.Add(material); //atlasAsset.materials[i] = mat;
|
||||
}
|
||||
}
|
||||
|
||||
atlasAsset.materials = populatingMaterials.ToArray();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user