playMaker

Author Topic: Find Game Object doesnt work (sometime)  (Read 1044 times)

mooblegum

  • Playmaker Newbie
  • *
  • Posts: 18
Find Game Object doesnt work (sometime)
« on: June 05, 2020, 06:17:51 AM »
Hello everyone,

I am trying to convert my interactive objects to prefabs, and therefore I use "Find Game Object" script to reference the GO I need on start.
I have this strange error where some GO are not referenced and result a "None" when I launch the game. (I attached a screenshot to show the configuration)
Do you have any Idea what could be the problem?
Is there a better way to references prefab together.

Thank you for your help!




mooblegum

  • Playmaker Newbie
  • *
  • Posts: 18
Re: Find Game Object doesnt work (sometime)
« Reply #1 on: June 05, 2020, 06:59:37 AM »

It seem I found why it didn't work,
The GO that could not be found with "Find Game Object" where disabled in the scene.
The work around was to first reference them and disable them by script instead having them disabled from the start.
Not sure if that make sense ?