Search Issue Tracker
Active
Votes
0
Found in [Package]
1.0.12
Issue ID
BEHAVB-341
Regression
No
Cloned scene agent shares graph instance due to SceneProcessor Pre-initialization
*Steps to reproduce:*
# Create a new BehaviorGraph and open it
# Disable the OnStart Repeat
# Connect a LogMessage and SetVariableValue to the OnStart node
# Assign a BlackboardVariable<String> to both node with a default value "Hello World"
# SetVariableValue node set the string to "Invalid"
# Attach the Graph to a GameObject in the scene
# Create a script with the provided code and attach it to a GameObject in the scene, then assign to it the agent Gao as Prefab
# Enter playmode and press space several times
*Actual results:*
* Hello World
* Invalid
* Invalid
* ...
*Expected results:*
* Hello World
* Hello World
* ...
*Reproducible with versions:* 1.0.12, 1.0.7
*Code:*
{code}
public class CloneAgent : MonoBehaviour
{
[SerializeField]
private GameObject m_Prefab;
private GameObject m_Instance;
private void Awake() => m_Prefab.SetActive(false);
private void Update()
{
if (Input.GetKeyDown(KeyCode.Space))
{
Clone();
}
}
private void Clone()
{
if (m_Instance != null)
{
Destroy(m_Instance);
}
m_Instance = Instantiate(m_Prefab);
m_Instance.SetActive(true);
}
}
{code}
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Opening Terrain Prefab in Prefab Editing Mode throws "NullReferenceException" error
- [Search] Dragging query pills put them behind the search text field
- A CustomPropertyDrawer that returns a PropertyField for a property named the same as a child field will not render all child fields
- Graphics Settings shows default values instead of the real values in the Rendering Debugger when Volume.profile is assigned via script
- Deleting multiple Tags throws “NullReferenceException”, and "Retrieving array element that was out of bounds" errors when holding the Enter key
Add comment