From 190c133dcac0a6b6c87d5d54461a7abb2f84497c Mon Sep 17 00:00:00 2001 From: Dmitry Tabulin Date: Tue, 10 Sep 2024 15:57:53 +0300 Subject: [PATCH] Update register-monobehaviour.mdx Method names fixes --- website/docs/registering/register-monobehaviour.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/docs/registering/register-monobehaviour.mdx b/website/docs/registering/register-monobehaviour.mdx index 5bf00de6..bcc9a6e8 100644 --- a/website/docs/registering/register-monobehaviour.mdx +++ b/website/docs/registering/register-monobehaviour.mdx @@ -99,7 +99,7 @@ builder.UseComponents(components => { components.AddInstance(yourBehaviour); components.AddInHierarchy(); - components.AddFromNewPrefab(prefab, Lifetime.Scoped); + components.AddInNewPrefab(prefab, Lifetime.Scoped); components.AddOnNewGameObject(Lifetime.Scoped, "name"); }); ``` @@ -109,7 +109,7 @@ This is the same as: ```csharp builder.RegisterComponent(yourBehaviour); builder.RegisterComponentInHierarchy(); -builder.RegisterComponentFromNewPrefab(prefab, Lifetime.Scoped); +builder.RegisterComponentInNewPrefab(prefab, Lifetime.Scoped); builder.RegisterComponentOnNewGameObject(Lifetime.Scoped, "name"); ``` @@ -122,7 +122,7 @@ builder.UseComponents(parentTransform, components => components.AddInHierarchy(); // Instantiate under `parentTransform` - components.AddFromNewPrefab(prefab, Lifetime.Scoped); + components.AddInNewPrefab(prefab, Lifetime.Scoped); components.AddOnNewGameObject(Lifetime.Scoped, "name"); }) ``` @@ -133,7 +133,7 @@ This is the same as: builder.RegisterComponentInHierarchy() .UnderTransform(parentTransform); -builder.RegisterComponentFromNewPrefab(prefab, Lifetime.Scoped) +builder.RegisterComponentInNewPrefab(prefab, Lifetime.Scoped) .UnderTransform(parentTransform); builder.RegisterComponentOnNewGameObject(Lifetime.Scoped, "name") .UnderTransform(parentTransform);