Access my scripts/assets from inside StandardAsset ThirdPersonuserControl.cs
I have imported the standard assets "Characters" into my project, and I am using the "ThirdPersonController" prefab for my player.
When I try to get a hold of any of my custom scripts (lets call it [myscriptname]) from within the "ThirdPersonUserControl", I get an error; "The type or namespace [myscriptname] could not be found (are you missing a using directive or an assembly reference?)"
I am not declaring any namespace for [myscriptname]. Below is the using directives for ThirdPersonUserControl.cs.
using System;
using UnityEngine;
using UnityStandardAssets.CrossPlatformInput;
Answer by Anisoropos · Mar 29, 2017 at 05:29 AM
Dirty fix: Create a new script, not under the StandardAssets folder and start copy-pasting parts of the ThirdPersonUserControl and checking if you can reference your scripts. Keep doing this untill all of the functionality is copied over.
At that point you can delete the old ThirdPersonUserControl and rename your script to ThirdPersonUserControl.
Your answer
Follow this Question
Related Questions
health script not working 0 Answers
Setting an asset to an instance of a class in a script 1 Answer
BasicFPS controller "Can not be loaded" 0 Answers
How do I set up 5DT gloves in Unity 5.4.1? 1 Answer
Code generated animation clip missing component when assigned to an animation controller. 1 Answer