-
Notifications
You must be signed in to change notification settings - Fork 13
feat: Add Capybara::Create and Text::Create #36
base: master
Are you sure you want to change the base?
Conversation
In Text.cs change of Network_collisionsEnabled to CollisionsEnabled. Change to param name for Capybara.cs and Text.cs because he was speakerToy.
| // </copyright> | ||
| // ----------------------------------------------------------------------- | ||
|
|
||
| #nullable enable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no no and no i don't want nullable there reason of why it's not enable in the project
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why 😔
Delete #nullable
(Forget to change that before oupsiii)
| if (PrefabCache<T>.Prefab == null) | ||
| { | ||
| T t = default(T); | ||
| using (Dictionary<uint, GameObject>.ValueCollection.Enumerator enumerator = NetworkClient.prefabs.Values.GetEnumerator()) | ||
| { | ||
| while (enumerator.MoveNext()) | ||
| { | ||
| if (enumerator.Current != null && enumerator.Current.TryGetComponent(out t)) | ||
| { | ||
| break; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| if (t == null) | ||
| { | ||
| throw new InvalidOperationException(string.Format("No prefab in NetworkClient.prefabs has component type {0}", typeof(T))); | ||
| } | ||
|
|
||
| PrefabCache<T>.Prefab = t; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uhm why ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
without that, the prefab are null.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but why using PrefabCache ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PrefabHelper.GetPrefab(PrefabType);
Description
Describe the changes
In Text.cs change of Network_collisionsEnabled to CollisionsEnabled.
Change to param name for Capybara.cs and Text.cs because he was speakerToy.
What is the current behavior? (You can also link to an open issue here)
Name of Network_collisionsEnabled in Text.cs.
Capybara.cs and Text.cs use speakerToy parameters.
What is the new behavior? (if this is a feature change)
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
no
Other information:
Types of changes
Submission checklist
Patches (if there are any changes related to Harmony patches)
Other