Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Silicon Power on January 12, 2019, 09:34:33 AM

Title: Find Closest game object by "Layer" instead of Tags? Plase help me.
Post by: Silicon Power on January 12, 2019, 09:34:33 AM
Hi there guys. I have more than 10,000 of empty game object in my scene and I've mentioned I there is frame rates drops when I set a tag on them! but it's good with layer!!!

So is there a "Find Closest GameObject" action that uses Layer instead of tags?
Title: Re: Find Closest game object by "Layer" instead of Tags? Plase help me.
Post by: tcmeric on January 12, 2019, 10:32:52 AM
No such ability exists natively in Unity. You can find the closest and then check its layers (using a separate action).

Link to the tag issue? Anyways, checking a gameobjects layer wouldnt be any faster than checking its tag.
Title: Re: Find Closest game object by "Layer" instead of Tags? Plase help me.
Post by: Silicon Power on January 12, 2019, 11:36:17 AM
No such ability exists natively in Unity. You can find the closest and then check its layers (using a separate action).

Link to the tag issue? Anyways, checking a gameobjects layer wouldnt be any faster than checking its tag.

Thanks. It seems I can't use find the closest action anymore because it reduce frames when it go to find a object between 10,000 of other objects.

Anyway I'm thinking for another method but don't know how should I do that!

I wan't to disable all my empty objects or fsm on the object and enable some of those only around my character. So I'm going to use trigger enter but how can I get those objects inside a trigger?
Title: Re: Find Closest game object by "Layer" instead of Tags? Plase help me.
Post by: heavygunner on January 12, 2019, 01:38:41 PM
Download Find Closest 2 from Ecosystembrowser ;)