We are trying to move third party plugins such as NodeCanvas into the “Standard Assets” directory in an attempt to reduce compile times down for our game as it is reaching an unacceptable amount of time for devs. Its wasteful to have 3rd party code be recompiled each time when we rarely if ever change it.
I tried placing NodeCanvas in there but got compile errors.
1
2
3
Assets/Standard Assets/NodeCanvas/Design/Editor/Inspectors/GraphInspector.cs(60,51):error CS0117:System.IO.File does not containadefinition forReadAllText
Assets/Standard Assets/NodeCanvas/Design/Editor/Inspectors/GraphInspector.cs(69,26):error CS0117:System.IO.File does not containadefinition forWriteAllText
I think maybe its difficult to do this for NodeCanvas as there is a few “Editor” directories inline as well as some Editor inspector code in the actual framework in the BehaviourTree Nodes.
Do you think it is feasible to restructure the project to be able to go into Standard Assets and is this something you have ever considered?
The error is not about moving NodeCanvas folder into “Standard Assets”, but rather for having selected Web Player as build option. I forgot to place derectives in this part.
Please open up GraphInspector.cs and place the contents of the method ShowJsonImportExport (where the errors show), within:
1
2
3
4
5
6
7
8
9
voidShowJsonImportExport(){
#if !UNITY_WEBPLAYER
//code here..
#endif
}
You will no more see the errors and be able to have NodeCanvas in Standard Assets as well.
BUT, you will have a problem with the Inspectors, because Unity requires that the inspector scripts are placed directly under an ‘Editor’ folder that is placed under “Standard Assets”. I might have to rethink the folder structure for that.