Fix sprite render actors spawning with overridden defaults when they are part of a prefab.
This commit is contained in:
@@ -63,8 +63,12 @@ namespace FlaxEditor.SceneGraph.Actors
|
||||
|
||||
// Setup for default values
|
||||
var text = (SpriteRender)Actor;
|
||||
text.Material = FlaxEngine.Content.LoadAsyncInternal<MaterialBase>(EditorAssets.DefaultSpriteMaterial);
|
||||
text.Image = FlaxEngine.Content.LoadAsyncInternal<Texture>(EditorAssets.FlaxIconTexture);
|
||||
|
||||
if (!Actor.HasPrefabLink)
|
||||
{
|
||||
text.Material = FlaxEngine.Content.LoadAsyncInternal<MaterialBase>(EditorAssets.DefaultSpriteMaterial);
|
||||
text.Image = FlaxEngine.Content.LoadAsyncInternal<Texture>(EditorAssets.FlaxIconTexture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user