// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved. using FlaxEngine; namespace FlaxEditor.SceneGraph.Actors { /// /// Scene tree node for actor type. /// /// [HideInEditor] public sealed class TextRenderNode : ActorNode { /// public TextRenderNode(Actor actor) : base(actor) { } /// public override void PostSpawn() { base.PostSpawn(); if (Actor.HasPrefabLink) { return; } // Setup for default values var text = (TextRender)Actor; text.Text = "My Text"; text.Font = FlaxEngine.Content.LoadAsyncInternal(EditorAssets.PrimaryFont); text.Material = FlaxEngine.Content.LoadAsyncInternal(EditorAssets.DefaultFontMaterial); } } }