How to disable and enable the prefab with normcore
Hi. I'm new to the multiplayer game.
I'd like to disable and enable the prefab in my game while running.
I'm using .SetActive() now.
How do I use normcore?
Thank you in advance for the answer.
I'd like to disable and enable the prefab in my game while running.
I'm using .SetActive() now.
How do I use normcore?
Thank you in advance for the answer.
Solution
----------------------
If you want to remove the object at index 0 after finishing the loop, you can do so by calling the
In this example,
----------------------
Note: you can ask me a follow up question by @ mentioning me again
----------------------
If you want to remove the object at index 0 after finishing the loop, you can do so by calling the
RemoveAt() method on the list. Here's how you can modify the previous example:In this example,
RemoveAt(0) is called on _objects after the for loop. This removes the object at index 0 from the list. The if (_objects.Count > 0) check is there to ensure that there is at least one object in the list before trying to remove one.----------------------
Note: you can ask me a follow up question by @ mentioning me again
----------------------
