• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by BitwiseGuy · May 10, 2015 at 07:03 PM · guieditorhandles

Handles.color not working for Handles.PositionHandle

In an effort to make some object handlers a little more user-friendly, I tried to add position handles for each point along an object's given path. It gets a little cluttered when there's a number of points, so I was hoping to hide the points unless the list is expanded (Though that's for another question) and make the handles for the points a different color so it was more obvious which ones were the path, and where they were along the path. I used:

 public class PointFollowPathEditor : Editor 
 {
     public bool showPathHandles = true;
 
     void OnSceneGUI()
     {
         if (showPathHandles) 
         {
             Handles.color = Color.grey;
             //Handles.selectedColor = Color.white;
             PointFollowPath thisTarget = (PointFollowPath)target;
             for (int i = 0; i < thisTarget.Points.Count; i++) 
             {
                 Handles.color = Color.grey;
                 thisTarget.Points [i] = Handles.PositionHandle (thisTarget.Points [i], Quaternion.identity);
             }
         }
         if (GUI.changed)
             EditorUtility.SetDirty (target);
     }
 }

However, the handles are always the standard red/green/blue. Nothing I've done seems to change them to grey. Am I doing something wrong?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

How to disable and enable UnityEditor Handles from receiving mouse events? 1 Answer

GUI error when using HandleUtility.PickGameObject() 1 Answer

uGUI WorldSpace elements part of GameObjects 1 Answer

How do I make a progress bar in the editor lock the background? 0 Answers

Drawing Editor Inspector GUI based on selected/current prefab (CustomPropertyDrawer) 2 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges