How to get runtime source code working with extra packs

jfcarter

New member
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
 
Last edited:
Take a look at the top of this page for how to import the source:


If you follow the top of that page you won't get any errors when importing.
 
Take a look at the top of this page for how to import the source:


If you follow the top of that page you won't get any errors when importing.
It has to do with the assembly definitions I believe. How should they be setup?
 
I got it working, for future reference I added a asmdef to the formations and tactical scripts folder (movement already had one). Then had them reference the asmdef in the runtime folder.
 
Back
Top