- Jul 31, 2018
- 25
- 6
I have a problem while trying to get trough Unity in-build tutorial, the Particle System which I need to play when the health consumables collides with a main character is also playing on the start of game mode. After a while, to understand why is that so, I am trying to disabling one-by-one things in the main character script that I thought was related to the above mentioned particle system, and after a fail, I have found the reason outside the code.
Unfortunately, after I have disable such option, the Particle System stopped to be used at all, anywhere and anytime in the game mode, which not what I want to. The particle system
The console error massage is next...
Unfortunately, after I have disable such option, the Particle System stopped to be used at all, anywhere and anytime in the game mode, which not what I want to. The particle system
Consume_Health_Potions
is a child object of the main character object. Those I have tried to use SetActive
and GetComponentInChildren
to deactivate it on the start of the game mode, but with no much success.
C:
// Start is called before the first frame update.
void Start()
{
GameObject Strawberry;
Strawberry = GetComponentInChildren<Consume_Health_Potions>();
Strawberry.SetActive(false);
}
The console error massage is next...
C:
Assets\Scripts\Idiotic_Ruby_Controller.cs(43,56): error CS0246: The type or namespace name 'Consume_Health_Potions' could not be found (are you missing a using directive or an assembly reference?)