/// <summary> /// Handle <see cref="LineWaterEvents.DidCreate"/> event /// </summary> public void HandleDidCreateLineWater(DidCreateLineWaterArgs arguments) { // Obtain parameters necessary for the position set var gameObjectPosition = arguments.GameObject.transform.position; // Move up the road to avoid z-clipping with regions arguments.GameObject.transform.position = gameObjectPosition + Vector3.up * 0.1f; }
/// <summary> /// Triggered by the Maps SDK during the loading process. /// Re-parents the newly created GameObject if a container was provided for this map feature /// category. /// </summary> void OnLineWaterCreated(DidCreateLineWaterArgs args) { if (LineWaterContainer != null) { // Note: Care should be taken when reparenting SDK created object. // See note above in ClearContainer() args.GameObject.transform.SetParent(LineWaterContainer.transform, true); } }