SpawnStorm
New member
I've posted a similar report in the Discord - https://discord.com/channels/476506682382483456/478012956899147797/901591267803267082
Basically, I'm attempting to modify the source for CharacterLocomotion.cs. However, if I add a 'using [xyz Namespace]' to the file, it is not detected. Unity also throws an exception on compile, so this isn't a limitation of the IDE.
Repro steps:
Create a fresh 3D (legacy pipeline) project (Unity 2021.1.3.f1, but others have been tested).
Import TPC 2.4.2 (latest)
Import Final IK 2.1 (latest)
Open CharacterLocomotion.cs
Add "using RootMotion.FinalIK;" on line 20 (just after "using UnityEngine;")
Observe that IDE and Unity do not recognize the assembly reference.
Create a new script in Assets folder
Add "using RootMotion.FinalIK;"
Observe that it accepts the assembly reference.
Error:
Assets\Opsive\UltimateCharacterController\Scripts\Character\CharacterLocomotion.cs(20,11): error CS0246: The type or namespace name 'RootMotion' could not be found (are you missing a using directive or an assembly reference?)
Notes:
I've tested this on Odin ("using Sirenix.OdinInspector.Internal;") - this works.
I've tested this with Chronos ("using Chronos") - this doesn't work.
If CharacterLocomotion.cs is moved to Assets folder, all tests work, but this will of course break other things from what I've read in the Discord.
This appears to match a behavior from a long time ago where scripts within an Editor folder will fail to detect non-Editor script. However, the path for CharacterLocomotion.cs is not in an Editor folder.
Additionally, both FinalIK and Odin exist within the Plugins folder, whereas Chronos does not. Placing Chronos into a Plugins folder does not change the above behavior.
Basically, I'm attempting to modify the source for CharacterLocomotion.cs. However, if I add a 'using [xyz Namespace]' to the file, it is not detected. Unity also throws an exception on compile, so this isn't a limitation of the IDE.
Repro steps:
Create a fresh 3D (legacy pipeline) project (Unity 2021.1.3.f1, but others have been tested).
Import TPC 2.4.2 (latest)
Import Final IK 2.1 (latest)
Open CharacterLocomotion.cs
Add "using RootMotion.FinalIK;" on line 20 (just after "using UnityEngine;")
Observe that IDE and Unity do not recognize the assembly reference.
Create a new script in Assets folder
Add "using RootMotion.FinalIK;"
Observe that it accepts the assembly reference.
Error:
Assets\Opsive\UltimateCharacterController\Scripts\Character\CharacterLocomotion.cs(20,11): error CS0246: The type or namespace name 'RootMotion' could not be found (are you missing a using directive or an assembly reference?)
Notes:
I've tested this on Odin ("using Sirenix.OdinInspector.Internal;") - this works.
I've tested this with Chronos ("using Chronos") - this doesn't work.
If CharacterLocomotion.cs is moved to Assets folder, all tests work, but this will of course break other things from what I've read in the Discord.
This appears to match a behavior from a long time ago where scripts within an Editor folder will fail to detect non-Editor script. However, the path for CharacterLocomotion.cs is not in an Editor folder.
Why can't some of my scripts see other scripts or namespaces?
I’m creating a custom editor for an item system, and for some reason, some of my scripts cannot access other scripts or namespaces. What would be causing this? // This script can access any other script // File located in Assets/ItemSystem/Scripts/Editor/ISEditor namespace ItemSystem.Editor {...
answers.unity.com
Last edited: