// Use this for initialization void Start() { unityARAnchorManager = new UnityARAnchorManager(); planesParent = transform; UnityARUtility.InitializePlanePrefab(planePrefab); // UnityARUtility.InitializePlanesParent(planesParent); }
// Use this for initialization void Start() { unityARAnchorManager = new UnityARAnchorManager(); UnityARUtility.InitializePlanePrefab(planePrefab); planeCount = 0; }
// Use this for initialization void Start() { Debug.Log("Called UNITYARGENERATEPLANE.CS"); allThePlanes = new List <GameObject>(); unityARAnchorManager = new UnityARAnchorManager(); UnityARUtility.InitializePlanePrefab(planePrefab); planeCollider = planePrefab.GetComponent <Collider>(); planeCenter = planeCollider.bounds.center; whateverCube = GameObject.CreatePrimitive(PrimitiveType.Cube); whateverCube.transform.parent = planePrefab.transform; whateverCube.transform.position = planeCenter; allThePlanes.Add(planePrefab); Debug.Log("planes detected are: " + allThePlanes.Count); //translate to AR world scale (10%) //move .05 units up so that the cube sits on the plane whateverCube.transform.localScale = new Vector3(.1f, .1f, .1f); whateverCube.transform.position = new Vector3(0, .05f, 0); //whateverCube.transform.localScale = new Vector3(planeCenter.x * 0.1f ,planeCenter.y * 0.1f ,planeCenter.z * 0.1f ); // GameObject go = Instantiate(whateverCube,planeCenter,Quaternion.identity); }
// Use this for initialization void Start() { unityARAnchorManager = new UnityARAnchorManager(); // ManagerScript.instance.AddPlaneRenderer(planePrefab); //Debug.LogWarning("UnityARGeneratePlane"); ManagerScript.instance.AssignARPrefab(planePrefab); UnityARUtility.InitializePlanePrefab(planePrefab); }
// Use this for initialization void Start() { if (Hit == false) { unityARAnchorManager = new UnityARAnchorManager(); UnityARUtility.InitializePlanePrefab(planePrefab); Hit = true; } }
// Use this for initialization void Start() { unityARAnchorManager = new UnityARAnchorManager(); UnityARUtility.InitializePlanePrefab(planePrefab); Button btn = freezeSun.GetComponent <Button>(); btn.onClick.AddListener(TaskOnClick); }
public void initStart() { analytic.time_startFindPlane = Time.time; planePrefab.SetActive(true); UnityARHitTestExample hitScript = hitParent.GetComponentInChildren <UnityARHitTestExample>(); unityARAnchorManager = new UnityARAnchorManager(this, hitParent, hitScript, Camera_managerScrpt); UnityARUtility.InitializePlanePrefab(planePrefab); }
public void UpdateAnchor(ARPlaneAnchor arPlaneAnchor) { if (planeAnchorMap.ContainsKey(arPlaneAnchor.identifier)) { ARPlaneAnchorGameObject arpag = planeAnchorMap [arPlaneAnchor.identifier]; UnityARUtility.UpdatePlaneWithAnchorTransform(arpag.gameObject, arPlaneAnchor); arpag.planeAnchor = arPlaneAnchor; planeAnchorMap [arPlaneAnchor.identifier] = arpag; } }
private void OnDisable() { UnityARUtility.InitializePlanePrefab(null); int cl = transform.childCount; for (int i = 0; i < cl; i++) { transform.GetChild(i).gameObject.SetActive(false); } }
public void AddAnchor(ARPlaneAnchor arPlaneAnchor) { GameObject gameObject = UnityARUtility.CreatePlaneInScene(arPlaneAnchor); gameObject.AddComponent <DontDestroyOnLoad>(); ARPlaneAnchorGameObject aRPlaneAnchorGameObject = new ARPlaneAnchorGameObject(); aRPlaneAnchorGameObject.planeAnchor = arPlaneAnchor; aRPlaneAnchorGameObject.gameObject = gameObject; planeAnchorMap.Add(arPlaneAnchor.identifier, aRPlaneAnchorGameObject); }
public void UpdateAnchor(ARPlaneAnchor arPlaneAnchor) { if (planeAnchorMap.ContainsKey(arPlaneAnchor.identifier)) { ARPlaneAnchorGameObject arpag = planeAnchorMap [arPlaneAnchor.identifier]; UnityARUtility.UpdatePlaneWithAnchorTransform(arpag.gameObject, arPlaneAnchor); arpag.planeAnchor = arPlaneAnchor; planeAnchorMap [arPlaneAnchor.identifier] = arpag; bound = arpag.gameObject.GetComponentInChildren <MeshRenderer>().bounds; } }
public void AddAnchor(ARPlaneAnchor arPlaneAnchor) { GameObject go = UnityARUtility.CreatePlaneInScene(arPlaneAnchor); go.AddComponent <DontDestroyOnLoad> (); //this is so these GOs persist across scene loads ARPlaneAnchorGameObject arpag = new ARPlaneAnchorGameObject(); arpag.planeAnchor = arPlaneAnchor; arpag.gameObject = go; planeAnchorMap.Add(arPlaneAnchor.identifier, arpag); }
public void UpdateAnchor(ARPlaneAnchor arPlaneAnchor) { if (planeAnchorMap.ContainsKey(arPlaneAnchor.identifier)) { ARPlaneAnchorGameObject arpag = planeAnchorMap [arPlaneAnchor.identifier]; UnityARUtility.UpdatePlaneWithAnchorTransform(arpag.gameObject, arPlaneAnchor); arpag.planeAnchor = arPlaneAnchor; planeAnchorMap [arPlaneAnchor.identifier] = arpag; DebugPlaneTiler planeTiler = arpag.gameObject.GetComponentInChildren <DebugPlaneTiler>(); if (planeTiler) { planeTiler.UpdateWithinList(); } } }
public void AddAnchor(ARPlaneAnchor arPlaneAnchor) { GameObject go = UnityARUtility.CreatePlaneInScene(arPlaneAnchor); go.AddComponent <DontDestroyOnLoad> (); //this is so these GOs persist across scene loads ARPlaneAnchorGameObject arpag = new ARPlaneAnchorGameObject(); arpag.planeAnchor = arPlaneAnchor; arpag.gameObject = go; planeAnchorMap.Add(arPlaneAnchor.identifier, arpag); //下面是自己写的 //if(planeAnchorMap.Count>1){ // RemoveAnchor(lastARPlaneAnchor); //} bound = go.GetComponentInChildren <MeshRenderer>().bounds; lastARPlaneAnchor = arPlaneAnchor; }
public void AddAnchor(ARPlaneAnchor arPlaneAnchor) { GameObject go = UnityARUtility.CreatePlaneInScene(arPlaneAnchor); go.AddComponent <DontDestroyOnLoad> (); //this is so these GOs persist across scene loads ARPlaneAnchorGameObject arpag = new ARPlaneAnchorGameObject(); arpag.planeAnchor = arPlaneAnchor; arpag.gameObject = go; DebugPlaneTiler planeTiler = go.GetComponentInChildren <DebugPlaneTiler>(); if (planeTiler) { planeTiler.AddToList(); } planeAnchorMap.Add(arPlaneAnchor.identifier, arpag); }
public void AddAnchor(ARPlaneAnchor arPlaneAnchor) { GameObject go = UnityARUtility.CreatePlaneInScene(arPlaneAnchor); go.AddComponent <DontDestroyOnLoad> (); //this is so these GOs persist across scene loads ARPlaneAnchorGameObject arpag = new ARPlaneAnchorGameObject(); arpag.planeAnchor = arPlaneAnchor; arpag.gameObject = go; planeAnchorMap.Add(arPlaneAnchor.identifier, arpag); UnityARSessionNativeInterface.ARAnchorAddedEvent -= AddAnchor; //modified PlaneAppearDetector detector = generatedPlane; detector.planeDetect(); detector = hitScript; detector.planeDetect(); PlaneDetectorSwitcher switcher = Camera_managerScrpt; }
// Use this for initialization void Start() { unityARAnchorManager = new UnityARAnchorManager(); UnityARUtility.InitializePlanePrefab(planePrefab); planePrefab.tag = "plane"; }
// Use this for initialization void Start() { //UIPanels.Instance.configScreens.SetState (ConfigScreens.states.CONFIG_AREA); unityARAnchorManager = new UnityARAnchorManager(); UnityARUtility.InitializePlanePrefab(planePrefab); }
private void CreateARAnchor(Anywhere.Notification _notif) { unityARAnchorManager = new UnityARAnchorManager(); UnityARUtility.InitializePlanePrefab(planePrefab); }
//public static float height_y; //public static Bounds bound; //public static Bounds bound2;//使用一个平面还是两个?如果两个的话,启用bound2 // Use this for initialization void Start() { unityARAnchorManager = new UnityARAnchorManager(); UnityARUtility.InitializePlanePrefab(planePrefab); // bound2 = new Bounds(new Vector3(0, 0, 0), new Vector3(0, 0, 0)); }
public void NewSession() { unityARAnchorManager.Destroy(); unityARAnchorManager = new UnityARAnchorManager(); UnityARUtility.InitializePlanePrefab(planePrefab); }
// Use this for initialization void Start() { Debug.Log("I am a generate plane and I am being created!"); unityARAnchorManager = new UnityARAnchorManager(); UnityARUtility.InitializePlanePrefab(planePrefab); }
public void ShowPlanes() { unityARAnchorManager = new UnityARAnchorManager(); UnityARUtility.InitializePlanePrefab(planePrefab); mainCamera.cullingMask = -1; }
// Use this for initialization void Start() { unityARAnchorManager = new UnityARAnchorManager(); UnityARUtility.InitializePlanePrefab(planePrefab, transform); }
private void Start() { unityARAnchorManager = new UnityARAnchorManager(); UnityARUtility.InitializePlanePrefab(planePrefab); }