Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • 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
2
Question by Rewq773 · Jul 01, 2018 at 07:07 PM · editoreditor-scriptingcustom editorcurve

Custom curve editor in the Inspector (Like in LineRenderer)

Can i add exactly the same field to edit the curve like they made for LineRenderer component to my CustomEditor script. Please do not recommend me the animation curve, i'm aware of it. Thanks. alt text

inspector-linerenderer.png (7.0 kB)
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 Shameness · Jul 01, 2018 at 10:27 PM 0
Share

Assembly reference of the line renderer says it is AnimationCurve what are you looking at. /// /// <para>Set the curve describing the width of the line at various points along its length.</para> /// public AnimationCurve widthCurve { get; set; }

avatar image Rewq773 Shameness · Jul 01, 2018 at 10:41 PM 0
Share

Yes, obviously! But i'm looking for a way to build that particular EditorGUILayout if any. There is a difference from AnimationCurve layout.

alt text

1199442-inspector-linerenderer.png (30.7 kB)

2 Replies

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

Answer by Bunny83 · Jul 02, 2018 at 12:27 AM

No, you can't simply use that editor because it's an internal class. The linerenderer editor uses the LineRendererCurveEditor which is an internal class. It will in turn also use the CurveEditor class which is also an internal class.


Note that this repository may only be used for reference. You are not allowed to copy or distribute any of the source code found in this repository. Make sure you read the license and copyright information on the main page.

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 Moritonal · Apr 11, 2020 at 11:59 PM

You can use the CurveField custom GUI element to edit curves in the editor similar to the LineRenderer.

Comment
Add comment · Show 2 · 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 Bunny83 · Apr 12, 2020 at 12:48 AM 0
Share

Uhm, have you read the bold text in the question? He didn't want to use AnimationCurves ^^. He also made that clear once again in the comments below his question

avatar image Moritonal · Apr 12, 2020 at 01:25 AM 1
Share

Uhm, this question is first on Google for "Custom Curve Editor". Existing answers made a custom curve editor sound impossible when it's very possible. Shockingly I wasn't trying to answer the two year old question, just adding some new info.

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.

Follow this Question

Answers Answers and Comments

91 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Change texture import settings by script 0 Answers

Why is Editor not persisting programmatic changes even when using EditorUtility.SetDirty() 1 Answer

Custom Editor Access to Scene Objects Variables (in the same way as UnityEvents) 1 Answer

Custom editor script for folders? 1 Answer

How can i get SerializedProperty from UnityEvent which in List. Sorry for my Eng. 2 Answers


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