Ejemplo n.º 1
0
        /// <summary>
        /// Handle <see cref="AreaWaterEvents.DidCreate"/> event.
        /// </summary>
        public void HandleDidCreateAreaWater(DidCreateAreaWaterArgs 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;
        }
Ejemplo n.º 2
0
 /// <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 OnAreaWaterCreated(DidCreateAreaWaterArgs args)
 {
     if (AreaWaterContainer != null)
     {
         // Note: Care should be taken when reparenting SDK created object.
         // See note above in ClearContainer()
         args.GameObject.transform.SetParent(AreaWaterContainer.transform, true);
     }
 }