Quantcast
Channel: Questions in topic: "namespace"
Viewing all articles
Browse latest Browse all 398

Why the scripts in plugin couldn't find the normal class/namespace ?

$
0
0
public class Unit : MonoBehaviour { public static void Test() { Debug.Log("Unity::Text()"); } } This Unit class is in normal space, out of the plugin. namespace HoneyFramework { public class CameraControler : MonoBehaviour { public static CameraControler instance; public float moveSpeed = 5.0f; [HideInInspector] public bool bIsDragging0 = false; [HideInInspector] public bool bIsDragging2 = false; private GameObject cameraRig; private Vector3 mouseStartPosition; private Plane plane = new Plane(Vector3.up, Vector3.zero); void Awake() { instance = this; cameraRig = transform.parent.Find("CameraRig").gameObject; transform.rotation = cameraRig.transform.rotation; GetComponent().depthTextureMode = DepthTextureMode.Depth; Unit.Test(); } } } This part of the code is in the plugin HoneyFramework and the line Unit.Test(); won't work, just couldn't find the class, and the namespace out of the plugin also couldn't be found. But the Unit class could use the HoneyFramework space and other classes. Why is that happening, Is there any access permission or something else? And is there any solution for classes in the plugin HoneyFramework to use normal classes and namespace?

Viewing all articles
Browse latest Browse all 398

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>