Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: rondmc on June 05, 2018, 04:18:47 PM
-
I tried reading the other topics related to this issue but none seem to be helping me figure this out.
Unity - 2017.3.1f1
PlayMaker 1.8.9
- My player object has a child object both with the same layer name but different tags. The On Trigger actions seem to only ignore this game object.
- The child object does not have a Rigidbody 2D, but the parent does.
- Everything works in the editor, but after I build the game the triggers that work/don't work seem to be random. So on one build, the player interacting with enemies works but may not trigger traps. On the other build, the player may trigger traps but may not collect items.
- All triggers working/breaking are dependent on the child object of the player and sometimes on another child of the player that's created at runtime from a prefab.
- Everything else in the game seems to run fine. Collision, AI, addons, menus, etc. It's just this one thing.
I think that's everything. I'm not sure if this is a PlayMaker issue, or I'm doing something wrong with Unity, but the issues occur due to PlayMaker On Trigger actions being used. Development builds don't throw any errors either. I'm pulling my hair out over this, mostly because the issue is semi-random.
-
Make sure your triggers are not touching anything or overlapping anything.
any overlapping trigger will work in the editor but at runtime won't work.
-
A friend of mine who's active in helping others in the Unity Discord says it shouldn't matter and other triggers go off on the same object no problem.
I tried updating to 2017.4.4f1 but that didn't help. I tried adding more debugs to a dev build and it's definitely the triggers not firing, not the FSMs not starting.
I'm going to try and to a get tag debug and see if maybe it's the tags messing up on build or if it's the colliders.
EDIT: So it's not the that the tags are being lost or anything. It's just that the triggers aren't hitting.
-
Okay, I thiiiiink I figured it out. I've made a build of my game 5 times with consistent success so knock on wood.
So if I understand it correctly, a FSM with an On Enter action automatically creates a On Enter Trigger component on the object, then is supposed to target the FSM in question that has it. For some reason, the objects that were having issue, did not link back to the FSM. The target FSM list was empty. After linking it, I've had no problems with the triggers not firing.
For good measure I updated the prefabs with what I assume were legacy scripts to make old On Enter actions work with updated versions of PlayMaker. I'm not sure what they were tbh. They were empty child objects that only appeared in the folder and not in the hierarchy when placed in the scene. Placing them in the scene and then applying the prefab got rid of them though with no issues after.
Don't know why it only broke during a build since it looked like it would be needed while playing in the editor as well though. That part still confuses me.
-
Okay, I thiiiiink I figured it out. I've made a build of my game 5 times with consistent success so knock on wood.
So if I understand it correctly, a FSM with an On Enter action automatically creates a On Enter Trigger component on the object, then is supposed to target the FSM in question that has it. For some reason, the objects that were having issue, did not link back to the FSM. The target FSM list was empty. After linking it, I've had no problems with the triggers not firing.
For good measure I updated the prefabs with what I assume were legacy scripts to make old On Enter actions work with updated versions of PlayMaker. I'm not sure what they were tbh. They were empty child objects that only appeared in the folder and not in the hierarchy when placed in the scene. Placing them in the scene and then applying the prefab got rid of them though with no issues after.
Don't know why it only broke during a build since it looked like it would be needed while playing in the editor as well though. That part still confuses me.
Thanks buddy, I've encounter exactly the same situation. Save me tons of hour to solve this.
-
Thank you. I solved the same problem.
-Unity 5.6.2p4
-PlayMaker 1.9.0
-
I have same issue with COLLISION ENTER. How do I figure out if those files are linked?
When Playmode is off. It looks like this
(https://i.gyazo.com/d5f904de19dc5a53e90632d52802d81f.png)
When Playmode is on, it does link it.
https://i.gyazo.com/e5d04c5f6bdb780fafdc3ca3dc55fe11.png
In build it will not work, but If I make new build there's a chance that it will start working.
Update: I've noticed that in new version of Unity/Playmaker. I can link those scripts.
(https://i.gyazo.com/249f3c2443d854b2733c369b76a2ddd2.png)
I wonder how can I do this in 1.8.4 version of playmaker. Or this is a bug?
-
Okay, I thiiiiink I figured it out. I've made a build of my game 5 times with consistent success so knock on wood.
So if I understand it correctly, a FSM with an On Enter action automatically creates a On Enter Trigger component on the object, then is supposed to target the FSM in question that has it. For some reason, the objects that were having issue, did not link back to the FSM. The target FSM list was empty. After linking it, I've had no problems with the triggers not firing.
For good measure I updated the prefabs with what I assume were legacy scripts to make old On Enter actions work with updated versions of PlayMaker. I'm not sure what they were tbh. They were empty child objects that only appeared in the folder and not in the hierarchy when placed in the scene. Placing them in the scene and then applying the prefab got rid of them though with no issues after.
Don't know why it only broke during a build since it looked like it would be needed while playing in the editor as well though. That part still confuses me.
Thanks for sharing! This saved me a lot of time fixing the Android build after updating my project to a more recent Playmaker and Unity.
-
Hello,
Does devs know about this issue? Because it is a pretty big problem.
I don't know if it only happened with old project updated to new Playmaker version or anything else.
But it's a big trouble fixing this manually for all my characters weapons and colliders...
I'm curious to hear from devs about this.
-
Same issue as here:
https://hutonggames.com/playmakerforum/index.php?topic=23998.0
They are working on it.