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