• Opsive has been nominated for TWO Unity Awards: Publisher of the Year and Best Development Tool (Behavior Designer Pro)! Your support means everything, cast your vote here: https://awards.unity.com/vote

Sensor Issue

human01

New member
I have a clean scene, almost exactly like the sample, using visibility. All this works great.
As soon as I add it to my mainScene, the circled red X in the stacked conditional, becomes just a red x, no circle.


I am trying to chase down the cause of this. Currently, I did no develop any of the main scene, so I'm kind of flying blind on this. Is there a list of things that can interrupt it? I dont really have any geo in the scene, and some of it is deactivated... so I can't really figure this one out. Nothing is obstructing the line of sight, Ive also tried distance and sound, same result, just the red X.

I know this question is a long shot, but before i start killing one item at a time, I was just wondering if there are any "usual culprits" that can cause this.
 
Right, if there is no circle its no being reevaluated. Here is the catch. The clean scene I am working it, all this works flawlessly. No issues. However, when I drag in a second scene, into the hierarchy, for example, a house and all of its geo, occludes, etc. (the actual game environment) - it stops evaluating. no circled red x.
 
If there's no circle around the x then it's not being reevaluated. Check for any errors and verify that the behavior tree is setup in order to allow for reevaluation.
 
I understand about the no circle, no eval. I get it. So, for this example, I took your sample scene "conditionalAborts" - I ran it as is and it works fine. Just as the scene I created myself. no issues.

I then dragged my environment scene, into your consitionalAborts scene, ran it, no circled red X, meaning it has failed.

The problem is not BD or how I have the tree setup, the issue is in my environment scene. I did not create this scene and its chock full of colliders, halls, rooms, ceilings/walls, occluder, lights, who knows what else. What I am trying to understand is, what, in general can cause this perfectly functional tree to fail when I load in all manner of assets? Otherwise, I need to tear this scene apart, object by object, until I find the culprit, and there are several hundred objects in this scene, maybe even a thousand. I am trying to narrow down my search, but I don't even know where to begin, this is why I am here, maybe there are some "gotchas" that block the raycast or however it works, or maybe occluders, I don't know.

Ive tried a lighter scene (just navmesh, few npcs and small objects) and got the same failure on an otherwise functional tree.

I also see no errors in graph, and one error in console that I think is not my issue (d3d12 attempting to bind a null or empty texture, etc)
 
My best suggestion is to place a breakpoint within the Visibility Sensor and see where it is returning early when you wouldn't expect. There really aren't any common gotchas, and breakpoint debugging is the quickest way to figure out the issue.
 
Ive "loosly" traced it back to "XRinteractionManager" I have not found the actual issue yet tho, but everytime this is in scene, it kills my re-evaluate. I asked around and no one has modified it. (XR stuff)

Could some sort of custom raycaster script possibly interfere?
 
Back
Top