Merge branch 'Menotdan-fix-spriterender-prefab'
This commit is contained in:
@@ -71,6 +71,11 @@ namespace FlaxEditor.SceneGraph.Actors
|
||||
{
|
||||
base.PostSpawn();
|
||||
|
||||
if (Actor.HasPrefabLink)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
((BoxCollider)Actor).AutoResize();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -334,6 +334,11 @@ namespace FlaxEditor.SceneGraph.Actors
|
||||
{
|
||||
base.PostSpawn();
|
||||
|
||||
if (Actor.HasPrefabLink)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Setup for an initial spline
|
||||
var spline = (Spline)Actor;
|
||||
spline.AddSplineLocalPoint(Vector3.Zero, false);
|
||||
|
||||
@@ -61,10 +61,15 @@ namespace FlaxEditor.SceneGraph.Actors
|
||||
{
|
||||
base.PostSpawn();
|
||||
|
||||
if (Actor.HasPrefabLink)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Setup for default values
|
||||
var text = (SpriteRender)Actor;
|
||||
text.Material = FlaxEngine.Content.LoadAsyncInternal<MaterialBase>(EditorAssets.DefaultSpriteMaterial);
|
||||
text.Image = FlaxEngine.Content.LoadAsyncInternal<Texture>(EditorAssets.FlaxIconTexture);
|
||||
var sprite = (SpriteRender)Actor;
|
||||
sprite.Material = FlaxEngine.Content.LoadAsyncInternal<MaterialBase>(EditorAssets.DefaultSpriteMaterial);
|
||||
sprite.Image = FlaxEngine.Content.LoadAsyncInternal<Texture>(EditorAssets.FlaxIconTexture);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,11 @@ namespace FlaxEditor.SceneGraph.Actors
|
||||
{
|
||||
base.PostSpawn();
|
||||
|
||||
if (Actor.HasPrefabLink)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Setup for default values
|
||||
var text = (TextRender)Actor;
|
||||
text.Text = "My Text";
|
||||
|
||||
@@ -29,6 +29,11 @@ namespace FlaxEditor.SceneGraph.Actors
|
||||
{
|
||||
base.PostSpawn();
|
||||
|
||||
if (Actor.HasPrefabLink)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Rotate to match the space (GUI uses upper left corner as a root)
|
||||
Actor.LocalOrientation = Quaternion.Euler(0, -180, -180);
|
||||
bool canSpawn = true;
|
||||
|
||||
Reference in New Issue
Block a user