Hello, I own behavior designer as well as the extra packs it comes with (movement, tactical, formation). I want to edit the Task.cs code so that I can change which transform it uses by default (see example code below). However, if i edit the Task.cs code it doesnt appear in git and doesnt affect the game. This makes me think the code is in a dll and rider (an ide) is just allowing me to view it through decompiling it but not actually change it. To fix this, I downloaded the runtime source code from the website to get its version of task.cs but it throws a bunch of bugs with the packs. How can I fix this, ultimately I just want to edit Task.cs I dont care how I have to do it.
P.S I have found that Task.cs, Action.cs, Conditional.cs, and Decorator.cs all have the same issue (they are in a dll I think and cant be changed). As I said before, bringing in the runtime source code package to edit them directly is impossible since it breaks my other packs. I know I can make my own version of Action, Conditional, and Decorator (EX: CustomAction.cs) and inherit from the originals to change this but then I will have to change the hundreds of other task to have them inherit from my custom versions of those scripts and I dont want to go that route if at all possible.
// CUSTOM
public Transform _customTransform;
protected Transform transform
{
get
{
// Check if _customTransform is already set and return it if so
if (_customTransform == null)
{
// Try to get a NavMeshAgent's transform only if _customTransform is not set
var navMeshAgent = GetComponentInChildren<NavMeshAgent>();
if (navMeshAgent != null)
{
_customTransform = navMeshAgent.transform;
}
else
{
_customTransform = base.transform;
}
}
return _customTransform;
}
}
//CUSTOM
P.S I have found that Task.cs, Action.cs, Conditional.cs, and Decorator.cs all have the same issue (they are in a dll I think and cant be changed). As I said before, bringing in the runtime source code package to edit them directly is impossible since it breaks my other packs. I know I can make my own version of Action, Conditional, and Decorator (EX: CustomAction.cs) and inherit from the originals to change this but then I will have to change the hundreds of other task to have them inherit from my custom versions of those scripts and I dont want to go that route if at all possible.
// CUSTOM
public Transform _customTransform;
protected Transform transform
{
get
{
// Check if _customTransform is already set and return it if so
if (_customTransform == null)
{
// Try to get a NavMeshAgent's transform only if _customTransform is not set
var navMeshAgent = GetComponentInChildren<NavMeshAgent>();
if (navMeshAgent != null)
{
_customTransform = navMeshAgent.transform;
}
else
{
_customTransform = base.transform;
}
}
return _customTransform;
}
}
//CUSTOM
Last edited: