• 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 pedroahpolonio · Oct 11, 2015 at 12:31 PM · editormeshscritping

How do I make script parameter changes visible on edit time?

I have an object (a trapezoid) whose shape is controlled by a script (it has parameters that define the width of the top and the bottom). This script also has code in its FixedUpdate function that alters the coordinates of the object's mesh's vertices.

If I play my game in the Unity editor and tweak the script parameters, I can see the shape change just fine, but if I try to tweak the script parameters outside of play mode, nothing changes.

Is there a way to make the changes visible outside of play mode?

Comment
Add comment · Show 2
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
avatar image adam.brzozowski · Oct 11, 2015 at 01:46 PM 0
Share

If you found an answer please place it as an answer ins$$anonymous$$d of a comment. That way people can find answers when they need it and people won't continue to view the question trying to help answer it. Thanks!

avatar image pedroahpolonio adam.brzozowski · Oct 11, 2015 at 01:51 PM 0
Share

Sorry, it was my first time posting. I will do as you suggested from here on out. Thank you.

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by pedroahpolonio · Oct 11, 2015 at 03:29 PM

Found my answer. I could have written my code in the OnRenderObject function and added [ExecuteInEditMode] to my script. Another possibility would have been to wrap my logic in an "if (!Application.IsPlaying)" condition.

Comment
Add comment · Share
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
avatar image
0

Answer by pedroahpolonio · Oct 11, 2015 at 02:06 AM

EDIT: Found the answer. Should have written my code in the OnRenderObject function and added [ExecuteInEditMode] to my script.

Comment
Add comment · Share
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

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

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Mesh import setting - scale factor = 0.01 default, why? 0 Answers

What is the best way to fix texture z-fighting? 5 Answers

Editor Script Handles.Label problem. Labels don't move with gameobject 1 Answer

Colored Voxel Meshs 2 Answers

Change an object's import settings in the editor 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges