playMaker

Author Topic: CompareTag bug on release builds Unity 5.x  (Read 1551 times)

psychopsam

  • Playmaker Newbie
  • *
  • Posts: 2
CompareTag bug on release builds Unity 5.x
« on: October 27, 2016, 07:53:39 AM »
Hey all.

I found a bug in Unity and the way to fix it in PlayMaker is to use this code in "GameObjectCompareTag.cs".  Basically tags compares wont work anymore. It affects 5.3.4 for example.  You'll find your code looking like where I've commented out the CompareTag command.  You will only notice it on release builds.

Code: [Select]
void DoCompareTag()
{
var hasTag = false;

if (gameObject.Value != null)
{
if (gameObject.Value.tag == tag.Value)
hasTag = true;
else
hasTag = false; //hasTag = gameObject.Value.CompareTag(tag.Value);
}

storeResult.Value = hasTag;

Fsm.Event(hasTag ? trueEvent : falseEvent);
}
« Last Edit: October 27, 2016, 08:02:16 AM by psychopsam »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: CompareTag bug on release builds Unity 5.x
« Reply #1 on: November 03, 2016, 05:48:06 AM »
Hi,

 This is not what I experience, I tested on 5.3.4 P1 and 5.4.2 P2

can you do a screenshot of the action setup?

Bye,

 Jean