private void On_BAnchor_BAnchorRayHoverExit(BAnchor bAnchor) { if (boundingBox) { boundingBox.SetActive(false); } }
private void On_BAnchor_BAnchorRaySelected(BAnchor bAnchor) { if (CanPlaceBAnchor == true && IS_NOT_NULL(ARCursor.Instance)) { bool succeeded = false; if (IsPlacing == false) { succeeded = ARManager.Instance.OnStartPlacingBAnchor(this, bAnchor); } else { succeeded = ARManager.Instance.OnStopPlacingBAnchor(this, bAnchor); } if (succeeded == true) { if (IsPlacing == false) { IsPlacing = true; InvokeEventIfBound(StartedPlacing, bAnchor); } else { IsPlacing = false; InvokeEventIfBound(EndedPlacing, bAnchor); } } } }
private void On_BAnchor_BAnchorRayHoverEnter(BAnchor bAnchor) { if (boundingBox) { boundingBox.SetActive(true); } }
public void SpawnTestBAnchor() { BAnchor testBAnchorPrefab = Resources.Load <BAnchor>(BConsts.PATH_AR_TestBAnchor); if (IS_NOT_NULL(testBAnchorPrefab)) { ARManager.Instance.SpawnBAnchorAtCursorPosition(testBAnchorPrefab, true); } }
private void On_BAnchorCursorPlacer_EndedPlacing(BAnchor bAnchor) { PlayAreaBAnchor playAreaBAnchor = (PlayAreaBAnchor)bAnchor; if (IS_NOT_NULL(playAreaBAnchor) && (ARE_EQUAL(playAreaBAnchor, this))) { InvokeEventIfBound(EndedPlacing, this); } }
protected override void OnValidate() { base.OnValidate(); if (CanValidate() == false) { return; } if (bAnchor == null) { bAnchor = GetComponentInHierarchy <BAnchor>(); } }
private void On_CameraRayCaster_OnRayCastableExit(IRayCastable rayCastable) { BAnchor bAnchor = (BAnchor)rayCastable; if (bAnchor && bAnchor == raycastedBAnchor) { raycastedBAnchor = null; if (IS_NOT_NULL(bButton)) { bButton.DisableButton(); } } }
private void On_CameraRayCaster_OnRayCastableEnter(IRayCastable rayCastable) { BAnchor bAnchor = (BAnchor)rayCastable; if (bAnchor) { raycastedBAnchor = bAnchor; if (IS_NOT_NULL(bButton)) { bButton.EnableButton(); } } }
protected override void Awake() { base.Awake(); // Initialize Banchor Collection Map foreach (BAnchorCollectionTupple bAnchorCollectionTupple in bAnchorCollectionTupples) { string bAnchorID = bAnchorCollectionTupple.BAnchorID; BAnchor bAnchorPrefab = bAnchorCollectionTupple.BAnchorPrefab; if (IS_KEY_NOT_CONTAINED(bAnchorCollectionMap, bAnchorID) && IS_NOT_NULL(bAnchorPrefab)) { bAnchorCollectionMap.Add(bAnchorID, bAnchorPrefab); } } }
//private float lastTimeReplicated; #endregion #region Life Cycle protected override void OnValidate() { base.OnValidate(); if (CanValidate()) { if (bAnchor == null) { bAnchor = GetComponentInHierarchy <BAnchor>(); } if (bAnchor != null) { bAnchorID = bAnchor.BAnchorID; } } }
protected override void OnValidate() { base.OnValidate(); if (CanValidate() == false) { return; } if (bAnchor == null) { bAnchor = GetComponent <BAnchor>(); } if (debugText == null) { debugText = GetComponent <BText>(); } }
public BAnchorCollectionTupple(string bAnchorID, BAnchor bAnchorPrefab) { BAnchorID = bAnchorID; BAnchorPrefab = bAnchorPrefab; }