Exemplo n.º 1
0
 private void OnDrawGizmos()
 {
     Gizmos.DrawIcon(transform.position, "CubeInCircle.png");
 }
Exemplo n.º 2
0
        //-------------------------------------------------
        void OnDrawGizmos()
        {
            if (this != instance)
            {
                return;
            }

            //NOTE: These gizmo icons don't work in the plugin since the icons need to exist in a specific "Gizmos"
            //		folder in your Asset tree. These icons are included under Core/Icons. Moving them into a
            //		"Gizmos" folder should make them work again.

            Gizmos.color = Color.white;
            Gizmos.DrawIcon(feetPositionGuess, "vr_interaction_system_feet.png");

            Gizmos.color = Color.cyan;
            Gizmos.DrawLine(feetPositionGuess, feetPositionGuess + trackingOriginTransform.up * eyeHeight);

            // Body direction arrow
            Gizmos.color = Color.blue;
            Vector3 bodyDirection        = bodyDirectionGuess;
            Vector3 bodyDirectionTangent = Vector3.Cross(trackingOriginTransform.up, bodyDirection);
            Vector3 startForward         = feetPositionGuess + trackingOriginTransform.up * eyeHeight * 0.75f;
            Vector3 endForward           = startForward + bodyDirection * 0.33f;

            Gizmos.DrawLine(startForward, endForward);
            Gizmos.DrawLine(endForward, endForward - 0.033f * (bodyDirection + bodyDirectionTangent));
            Gizmos.DrawLine(endForward, endForward - 0.033f * (bodyDirection - bodyDirectionTangent));

            Gizmos.color = Color.red;
            int count = handCount;

            for (int i = 0; i < count; i++)
            {
                Hand hand = GetHand(i);

                if (hand.handType == SteamVR_Input_Sources.LeftHand)
                {
                    Gizmos.DrawIcon(hand.transform.position, "vr_interaction_system_left_hand.png");
                }
                else if (hand.handType == SteamVR_Input_Sources.RightHand)
                {
                    Gizmos.DrawIcon(hand.transform.position, "vr_interaction_system_right_hand.png");
                }
                else
                {
                    /*
                     *                  Hand.HandType guessHandType = hand.currentHandType;
                     *
                     *                  if ( guessHandType == Hand.HandType.Left )
                     *                  {
                     *                          Gizmos.DrawIcon( hand.transform.position, "vr_interaction_system_left_hand_question.png" );
                     *                  }
                     *                  else if ( guessHandType == Hand.HandType.Right )
                     *                  {
                     *                          Gizmos.DrawIcon( hand.transform.position, "vr_interaction_system_right_hand_question.png" );
                     *                  }
                     *                  else
                     *                  {
                     *                          Gizmos.DrawIcon( hand.transform.position, "vr_interaction_system_unknown_hand.png" );
                     *                  }
                     */
                }
            }
        }
Exemplo n.º 3
0
 void OnDrawGizmos()
 {
     Gizmos.DrawIcon(transform.position, "item.png", true);
 }
Exemplo n.º 4
0
 void OnDrawGizmos()
 {
     Gizmos.DrawIcon(transform.position, "InventoryItem", false);
 }
Exemplo n.º 5
0
 void OnDrawGizmos()
 {
     Gizmos.color = Color.blue;
     Gizmos.DrawWireSphere(transform.position + new Vector3(0, 1, 0), spawnRadius);
     Gizmos.DrawIcon(transform.position, "enemy");
 }
Exemplo n.º 6
0
 /** Draws the Leap Motion gizmo when in the Unity editor. */
 void OnDrawGizmos()
 {
     // Draws the little Leap Motion Controller in the Editor view.
     Gizmos.matrix = Matrix4x4.Scale(GIZMO_SCALE * Vector3.one);
     Gizmos.DrawIcon(transform.position, "leap_motion.png");
 }
Exemplo n.º 7
0
 private void OnDrawGizmos()
 {
     Gizmos.DrawIcon(this.transform.position, "Spawn.tif");
 }
Exemplo n.º 8
0
 void OnDrawGizmos()
 {
     transform.position = flagData.tpos;
     Gizmos.DrawIcon(transform.position, "Flag.png");
 }
Exemplo n.º 9
0
 public void OnDrawGizmos()
 {
     Gizmos.DrawIcon(transform.position, Faction.GizmoIconNames[0], true);
 }
Exemplo n.º 10
0
 void OnDrawGizmos()
 {
     Gizmos.DrawIcon(gameObject.transform.position, iconName, true);
     transform.localScale = new Vector3(.2f, .2f, .2f);
 }
Exemplo n.º 11
0
 public void OnDrawGizmos()
 {
     Gizmos.DrawIcon(transform.position, "gizmo_weapon2");
 }
Exemplo n.º 12
0
 static void DrawGizmo(StudioEventEmitter studioEmitter, GizmoType gizmoType)
 {
     Gizmos.DrawIcon(studioEmitter.transform.position, "FMODEmitter.tiff", true);
 }
Exemplo n.º 13
0
 void OnDrawGizmos()
 {
     Gizmos.color = Color.grey;
     Gizmos.DrawIcon(transform.position, "MegaFlowIcon.png", true);
 }
Exemplo n.º 14
0
 void OnDrawGizmos()
 {
     Gizmos.DrawIcon(transform.position, "CameraPoint.tif");
 }
Exemplo n.º 15
0
// This script must be attached to a game object to tell Unity where the player starts in the level.

// We'll draw a gizmo in the scene view, so it can be found....
    void  OnDrawGizmos()
    {
        Gizmos.DrawIcon(transform.position, "Player Icon.tif");
    }
Exemplo n.º 16
0
 private void OnDrawGizmos()
 {
     Gizmos.DrawIcon(transform.position, "Player Spawn Gizmo.png", true);
 }
Exemplo n.º 17
0
 ///Forward Gizmos callback
 protected void OnDrawGizmos()
 {
     Gizmos.DrawIcon(transform.position, "GraphOwnerGizmo.png", true);
     DoGraphGizmos(graph);
 }
Exemplo n.º 18
0
 public static Gizmo DrawIcon(Vector3 center, string name, bool allowScaling = true)
 => Draw(new Gizmo(() => Gizmos.DrawIcon(center, name, allowScaling)));
Exemplo n.º 19
0
 private void OnDrawGizmos()
 {
     Gizmos.DrawIcon(transform.position, "teleport.png", true);
 }
 void OnDrawGizmos()
 {
     Gizmos.DrawIcon(transform.position, m_type == Type.Line ? "AreaLight Gizmo" : "PointLight Gizmo", true);
 }
Exemplo n.º 21
0
        public void OnDrawGizmosSelected()
        {
            if (!showGizmos)
            {
                return;
            }

            if (drawWanderRange)
            {
                // Draw circle of radius wander zone
                Gizmos.color = distanceColor;
                Gizmos.DrawWireSphere(origin == Vector3.zero ? transform.position : origin, wanderZone);

                Vector3 IconWander = new Vector3(transform.position.x, transform.position.y + wanderZone, transform.position.z);
                Gizmos.DrawIcon(IconWander, "ico-wander", true);
            }

            if (drawAwarenessRange)
            {
                //Draw circle radius for Awarness.
                Gizmos.color = awarnessColor;
                Gizmos.DrawWireSphere(transform.position, awareness);


                Vector3 IconAwareness = new Vector3(transform.position.x, transform.position.y + awareness, transform.position.z);
                Gizmos.DrawIcon(IconAwareness, "ico-awareness", true);
            }

            if (drawScentRange)
            {
                //Draw circle radius for Scent.
                Gizmos.color = scentColor;
                Gizmos.DrawWireSphere(transform.position, scent);

                Vector3 IconScent = new Vector3(transform.position.x, transform.position.y + scent, transform.position.z);
                Gizmos.DrawIcon(IconScent, "ico-scent", true);
            }

            if (!Application.isPlaying)
            {
                return;
            }

            // Draw target position.
            if (useNavMesh)
            {
                if (navMeshAgent.remainingDistance > 1f)
                {
                    Gizmos.DrawSphere(navMeshAgent.destination + new Vector3(0f, 0.1f, 0f), 0.2f);
                    Gizmos.DrawLine(transform.position, navMeshAgent.destination);
                }
            }
            else
            {
                if (targetLocation != Vector3.zero)
                {
                    Gizmos.DrawSphere(targetLocation + new Vector3(0f, 0.1f, 0f), 0.2f);
                    Gizmos.DrawLine(transform.position, targetLocation);
                }
            }
        }
Exemplo n.º 22
0
 private void OnDrawGizmos()
 {
     Gizmos.DrawIcon(transform.position, "Sturfee/WorldAnchor-Icon.png", true);
 }
Exemplo n.º 23
0
 void OnDrawGizmos()
 {
     Gizmos.DrawIcon(transform.position, "AreaLight Gizmo", true);
 }
Exemplo n.º 24
0
    //只在编辑器里起作用
    void OnDrawGizmos()
    {
        if (!DrawGizmos)
        {
            return;
        }

        //计算地图和格子大小
        CalculateSize();

        //格子颜色
        Gizmos.color = Color.green;

        //绘制行
        for (int row = 0; row <= RowCount; row++)
        {
            Vector2 from = new Vector2(-MapWidth / 2, -MapHeight / 2 + row * TileHeight);
            Vector2 to   = new Vector2(-MapWidth / 2 + MapWidth, -MapHeight / 2 + row * TileHeight);
            Gizmos.DrawLine(from, to);
        }

        //绘制列
        for (int col = 0; col <= ColumnCount; col++)
        {
            Vector2 from = new Vector2(-MapWidth / 2 + col * TileWidth, MapHeight / 2);
            Vector2 to   = new Vector2(-MapWidth / 2 + col * TileWidth, -MapHeight / 2);
            Gizmos.DrawLine(from, to);
        }

        //绘制格子
        foreach (Tile t in m_grid)
        {
            if (t.CanHold)
            {
                Vector3 pos = GetPosition(t);
                Gizmos.DrawIcon(pos, "holder.png", true);
            }
        }

        Gizmos.color = Color.red;
        for (int i = 0; i < m_road.Count; i++)
        {
            //起点
            if (i == 0)
            {
                Gizmos.DrawIcon(GetPosition(m_road[i]), "start.png", true);
            }

            //终点
            if (m_road.Count > 1 && i == m_road.Count - 1)
            {
                Gizmos.DrawIcon(GetPosition(m_road[i]), "end.png", true);
            }

            //红色的连线
            if (m_road.Count > 1 && i != 0)
            {
                Vector3 from = GetPosition(m_road[i - 1]);
                Vector3 to   = GetPosition(m_road[i]);
                Gizmos.DrawLine(from, to);
            }
        }
    }
Exemplo n.º 25
0
 private void OnDrawGizmos()
 {
     Gizmos.DrawIcon(transform.position, "spawner.tif");
 }
Exemplo n.º 26
0
    //显示一个图标
    void OnDrawGizmos()
    {
        Vector3 tmp = new Vector3(this.transform.position.x + 0.5f, this.transform.position.y + 0.5f, this.transform.position.z + 0.1f);

        Gizmos.DrawIcon(tmp, "gridnode.tif");
    }
Exemplo n.º 27
0
 private void OnDrawGizmos()
 {
     Gizmos.color = LightColor;
     Gizmos.DrawRay(transform.position, -transform.forward);
     Gizmos.DrawIcon(transform.position, "stLight_Directional");
 }
Exemplo n.º 28
0
 void OnDrawGizmos()
 {
     Gizmos.DrawIcon(transform.position, "InteractionTrigger", false);
 }
Exemplo n.º 29
0
        void OnDrawGizmos()
        {
            if (drawTriggerGizmos)
            {
                Color c = Color.red;

                Matrix4x4 cubeTransform   = Matrix4x4.TRS(transform.position, transform.rotation, transform.localScale);
                Matrix4x4 oldGizmosMatrix = Gizmos.matrix;

                Gizmos.matrix *= cubeTransform;



                if (armed)
                {
                    c            = Color.green;
                    c.a          = 0.5f;
                    Gizmos.color = c;
                    Gizmos.DrawCube(Vector3.zero, Vector3.one);
                    Gizmos.DrawIcon(transform.position + (Vector3.up * 0.5f), "Whilefun/triggerArmed.png");
                }
                else
                {
                    c            = Color.red;
                    c.a          = 0.5f;
                    Gizmos.color = c;
                    Gizmos.DrawCube(Vector3.zero, Vector3.one);
                    Gizmos.DrawIcon(transform.position + (Vector3.up * 0.5f), "Whilefun/triggerNotArmed.png");
                }

                Gizmos.matrix = oldGizmosMatrix;

                if (triggersToArmOnActivation != null)
                {
                    c            = Color.green;
                    c.a          = 0.5f;
                    Gizmos.color = c;

                    for (int t1 = 0; t1 < triggersToArmOnActivation.Length; t1++)
                    {
                        if (triggersToArmOnActivation[t1])
                        {
                            Gizmos.DrawLine(transform.position, triggersToArmOnActivation[t1].transform.position);
                        }
                    }
                }

                if (triggersToDisarmOnActivation != null)
                {
                    c            = Color.red;
                    c.a          = 0.5f;
                    Gizmos.color = c;

                    for (int t2 = 0; t2 < triggersToDisarmOnActivation.Length; t2++)
                    {
                        if (triggersToDisarmOnActivation[t2])
                        {
                            Gizmos.DrawLine(transform.position, triggersToDisarmOnActivation[t2].transform.position);
                        }
                    }
                }
            }
        }
Exemplo n.º 30
0
 public void OnDrawGizmosSelected()
 {
     Gizmos.DrawIcon(base.transform.position, "WwiseAudioSpeaker.png", false);
 }