public static Texture2D LoadDefaultSplatTexture() { Texture2D texture = LoadAssetTexture(HEU_PluginSettings.TerrainSplatTextureDefault); if (texture == null) { texture = HEU_MaterialFactory.WhiteTexture(); } return texture; }
public static Texture2D LoadAssetTexture(string path) { Texture2D texture = HEU_MaterialFactory.LoadTexture(path); if (texture == null) { Debug.LogErrorFormat("Unable to find the default Terrain texture at {0}. Make sure this default texture exists. Using default white texture instead.", path); texture = HEU_MaterialFactory.WhiteTexture(); } return texture; }
public static Texture2D LoadDefaultSplatTexture() { string defaultSplatTexturePath = HEU_PluginSettings.TerrainSplatTextureDefault; Texture2D texture = HEU_MaterialFactory.LoadTexture(defaultSplatTexturePath); if (texture == null) { Debug.LogErrorFormat("Unable to find the default Terrain texture at {0}. Make sure this default texture exists. Using default white texture instead.", defaultSplatTexturePath); texture = HEU_MaterialFactory.WhiteTexture(); } return texture; }