What causes a !m_DidWake?

I am not totally sure what is up with this or even if it is causing a “true” problem but it is there and am wondering why it is being cause and how should it be fixed. The exact error looks like this from the Console:

!m_DidAwake (Filename: /Users/joe/Desktop/automatic-unitybuild/unity/Projects/…/Runtime/Mono/MonoBehaviour.cpp Line: 194)

!m_DidAwake (Filename: /Users/joe/Desktop/automatic-unitybuild/unity/Projects/…/Runtime/Mono/MonoBehaviour.cpp Line: 133)

Project wise, I am attaching a script to a GO that adds a collider and a hinge joint and contains a FixedUpdate function for the Physics.

If, I comment out the FixedUpdate function the error goes away. Probably the one non-stanard piece is that there is no Awake function. But, it seems if I place one it still occurs.

Not real sure and I know it isn’t making sense… Hopefully someone has some idea.

Regards,

– Clint

I get these (and ignore them) anytime a bot is loaded in Botbuilder. It seems to be harmless.

But if anyone knows how I could make these go away, I’d be grateful. :slight_smile:

I think it happens if you add a component and immediately use Send/BroadcastMessage on it (as opposed to calling functions on it directly or waiting until the next physics step before using SendMessage). I could be wrong, but you might want to see if you have any code which does that.

I have nothing like that going on as far as Physics goes with this item. I essentially attach the script and call my init function. The init function looks like this:

var parGO : GameObject = GameObject.Find(gameObject.transform.parent.name);
var RB = parGO.AddComponent(Rigidbody);
RB.useGravity = false;	
RB.isKinematic = true;
	
var BC : BoxCollider = gameObject.AddComponent("BoxCollider");
BC.isTrigger = true;

gameObject.AddComponent("HingeJoint");
	
hingeJoint.connectedBody = RB;
	
hingeJoint.anchor = anchorPoint;
hingeJoint.axis = axisPoint;
	
hingeJoint.spring.spring = hingeSpring;
hingeJoint.spring.damper = hingeDamper;
hingeJoint.spring.targetPosition = hingeTargetPosition;
	
hingeJoint.limits.min = hingeMin;
hingeJoint.limits.minBounce = 0;
hingeJoint.limits.max = hingeMax;
hingeJoint.limits.maxBounce = 0;

hingeJoint.useLimits = true;
hingeJoint.useSpring = false;
	
targetPos = hingeMax;
	
init = true;

Regards,

– Clint[/code]

The error you are describing is an internal assert within Unity. It should be harmless, but a sign that there is possibly some corner case we need to handle in a different way. Have you reported a bug regarding this message using Report Bug.app?

Btw. you should be able to replacevar parGO : GameObject = GameObject.Find(gameObject.transform.parent.name);
with

var parGO = transform.parent.gameObject;

… which is much faster and robust. The current version will just find any game object that has the same name as the parent of the current game object. There can be more than one game object with the same name in the scene.

Thanks Freyr and I will report with the bug report app!

Regards,

– Clint