//################ UNITY START() ################################ void Start() { // Yet another neccessary step in the linking process ^^ ------------------------------------| #if UNITY_EDITOR //============== // ==================== // Let him do this. UNITY FAIL OTHERWISE dummy_function(0); //==================== // ==================== //============== // ## Open native library libraryHandle = OpenLibrary(Application.dataPath + LIB_PATH); Debug.Log("lib handle?? ->" + libraryHandle); // ## Assign the delegate pointer whatever from libraryHandel to the dll-func name. ## Init = GetDelegate <Init_Delegate>(libraryHandle, "Init"); // func 1 MonoUpdate = GetDelegate <MonoUpdate_Delegate>(libraryHandle, "MonoUpdate"); // func 2 ImageUpdate = GetDelegate <ImageUpdate_Delegate>(libraryHandle, "ImageUpdate"); // func 3 Shutdown = GetDelegate <Shutdown_Delegate>(libraryHandle, "Shutdown"); // func 4 #endif // -------------------------------------------------------------------------------------------| // Go ahead! Play with your C++ functions. Debug.Log("init: " + Init()); // C# CITY P_sum = Vector3.zero; CF_pos = Vector3.zero; LF_pos = CF_pos; CF_normal = Vector3.zero; LF_normal = Vector3.zero; LF_pointSet = Matrix4x4.identity; CF_pointSet = Matrix4x4.identity; dummyGO = new GameObject("dummy"); LF_StartEnd[0] = Vector3.zero; LF_StartEnd[1] = Vector3.zero; foreach (GameObject go in Resources.FindObjectsOfTypeAll(typeof(GameObject)) as GameObject[]) { if (!EditorUtility.IsPersistent(go.transform.root.gameObject) && !(go.hideFlags == HideFlags.NotEditable || go.hideFlags == HideFlags.HideAndDontSave)) { if (go.tag.Equals("fingerBall")) { fingerBallsInScene.Add(go); Debug.Log("Interactable gameObject Added to List!: " + go.name); } } } }
//################ UNITY START() ################################ void Start() { //GameObject createdplane = GameObject.CreatePrimitive(PrimitiveType.Plane); objectsInSceneboi = new List <GameObject>(); objectsInSceneboi = GetAllObjectsOnlyInScene(); Debug.Log("Alla GameObejcts i Scenen boi: " + objectsInSceneboi.Count); GO = new GameObject(); plane = WhoIsPlane();//-new (3/7) if (plane == null) { print("Aj Aj Senjor"); } // Yet another neccessary step in the linking process ^^ ------------------------------------| #if UNITY_EDITOR //============== // ==================== // Let him do this. UNITY FAIL OTHERWISE dummy_function(0);//==================== // ==================== //============== // ## Open native library libraryHandle = OpenLibrary(Application.dataPath + LIB_PATH); Debug.Log("lib handle?? ->" + libraryHandle); // ## Assign the delegate pointer whatever from libraryHandel to the dll-func name. ## Init = GetDelegate <Init_Delegate>(libraryHandle, "Init"); // func 1 MonoUpdate = GetDelegate <MonoUpdate_Delegate>(libraryHandle, "MonoUpdate"); // func 2 ImageUpdate = GetDelegate <ImageUpdate_Delegate>(libraryHandle, "ImageUpdate"); // func 3 Shutdown = GetDelegate <Shutdown_Delegate>(libraryHandle, "Shutdown"); // func 4 #endif // -------------------------------------------------------------------------------------------| // Go ahead! Play with your C++ functions. Debug.Log("init: " + Init()); mZCoord = Camera.main.WorldToScreenPoint(gameObject.transform.position).z; // Store offset = gameobject world pos - mouse world pos //mOffset = gameObject.transform.position - GetFingerAsWorldPoint(); speed = 0.6f; }
//################ UNITY START() ################################ void Start() { objectsInSceneboi = new List <GameObject>(); old_dll_xyz = Vector3.one; objectsInSceneboi = GetAllObjectsOnlyInScene(); Destroy(gameObject.transform.GetComponent <Rigidbody>()); Debug.Log("Alla GameObejcts i Scenen boi: " + objectsInSceneboi.Count); puzzleP = GameObject.Find("puzzle_piece"); puzzleP.GetComponent <Rigidbody>().isKinematic = true; GO = new GameObject(); thumbGO = GiveMeThumbGO(); middleGO = GiveMeMiddleGO(); // Yet another neccessary step in the linking process ^^ ------------------------------------| #if UNITY_EDITOR //============== // ==================== // Let him do this. UNITY FAIL OTHERWISE dummy_function(0); //==================== // ==================== //============== // ## Open native library libraryHandle = OpenLibrary(Application.dataPath + LIB_PATH); Debug.Log("lib handle?? ->" + libraryHandle); // ## Assign the delegate pointer whatever from libraryHandel to the dll-func name. ## Init = GetDelegate <Init_Delegate>(libraryHandle, "Init"); // func 1 MonoUpdate = GetDelegate <MonoUpdate_Delegate>(libraryHandle, "MonoUpdate"); // func 2 ImageUpdate = GetDelegate <ImageUpdate_Delegate>(libraryHandle, "ImageUpdate"); // func 3 Shutdown = GetDelegate <Shutdown_Delegate>(libraryHandle, "Shutdown"); // func 4 #endif // -------------------------------------------------------------------------------------------| // Go ahead! Play with your C++ functions. Debug.Log("init: " + Init()); update = MonoUpdate(); OPTask = Task <float> .Factory.StartNew(() => FingerUpdate()); print("OPTask started: " + OPTask.Result); }
//################ UNITY START() ################################ void Start() { objectsInScene = new List <GameObject>(); objectsInScene = GetAllObjectsOnlyInScene(); Debug.Log("Alla GameObejcts i Scenen boi: " + objectsInScene.Count); GO = new GameObject(); thumbGO = GiveMeThumbGO(); middleGO = GiveMeMiddleGO(); canvasLeftGO = GiveMeLeftCanvasGO(); canvasRightGO = GiveMeRightCanvasGO(); // Yet another neccessary step in the linking process ^^ ------------------------------------| #if UNITY_EDITOR //============== // ==================== // Let him do this. UNITY FAIL OTHERWISE dummy_function(0); //==================== // ==================== //============== // ## Open native library libraryHandle = OpenLibrary(Application.dataPath + LIB_PATH); Debug.Log("lib handle?? ->" + libraryHandle); // ## Assign the delegate pointer whatever from libraryHandel to the dll-func name. ## Init = GetDelegate <Init_Delegate>(libraryHandle, "Init"); // func 1 MonoUpdate = GetDelegate <MonoUpdate_Delegate>(libraryHandle, "MonoUpdate"); // func 2 ImageUpdate = GetDelegate <ImageUpdate_Delegate>(libraryHandle, "ImageUpdate"); // func 3 Shutdown = GetDelegate <Shutdown_Delegate>(libraryHandle, "Shutdown"); // func 4 #endif // -------------------------------------------------------------------------------------------| // Go ahead! Play with your C++ functions. Debug.Log("init: " + Init()); }