playMaker

Author Topic: Find Game Object doesn't look for disabled objects?  (Read 6195 times)

brisck1

  • Playmaker Newbie
  • *
  • Posts: 40
Find Game Object doesn't look for disabled objects?
« on: January 09, 2014, 08:25:19 AM »
I'm having some major issues with the "Find Game Object" action at the moment.

It seems to be set to ignore disabled objects by default, which is a little annoying since I need some objects disabled by default.
So anyway, I decided to then try starting with my objects enabled, finding them in the FSM with Find Game Object & storing as Var's, and then disabling them from the FSM (using Activate Game Object + vars).

So far so good, but then next problem comes when I try to re-enable them again later using Activate Game Object: nothing happens! I can't get the objects to re-enable using the variables stored from the Find Game Object action. Again I think this could be something to do with them being disabled?


scratch that last part, but is there any way that Find Game Object could look for disabled objects?
« Last Edit: January 09, 2014, 08:30:38 AM by brisck1 »

brisck1

  • Playmaker Newbie
  • *
  • Posts: 40
Re: Find Game Object doesn't look for disabled objects?
« Reply #1 on: January 09, 2014, 10:50:59 AM »
On further experimentation with Find Object I have had to abandon it's use altogether. For some reason, activating and deactivating objects using the stored variable was very random. Sometimes I couldn't re-active an object after disabling it and sometimes I could but then other actions affecting that object wouldn't work. I thought I'd found an awesome action there that could have saved me a lot of time :(

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15620
  • Official Playmaker Support
Re: Find Game Object doesn't look for disabled objects?
« Reply #2 on: January 10, 2014, 06:16:42 AM »
Hi,

 It's a Unity restrictions, you can'f find a gameobject that is not active. You have to have a reference of it prior it's disabled.

Bye,

 Jean

CCS

  • Playmaker Newbie
  • *
  • Posts: 9
Re: Find Game Object doesn't look for disabled objects?
« Reply #3 on: November 24, 2020, 08:06:40 AM »
It would be cool to add this "detail/restriction" in the BB documentation to avoid people wasting time searching the solution on google/the forum.

https://hutonggames.fogbugz.com/default.asp?W51