Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
1
Question by Zielscheibe · Jun 08, 2017 at 12:21 PM · animationserializablefieldcustom class

Can't find serialized field in Animation Window

Hi,

I noticed a problem within Unitys animation window. Using the Add Property button does not show the fields of my class. The fields I want to see are actually fields of another serialized class and I think this might be the problem.

Here a reproducable example configuration in a complety new project.
I have two classes, FooFront and FooBack:

 [Serializable]
 public class FooBack
 {
     public float Test;
 }
 
 public class FooFront : MonoBehaviour
 {
     public FooBack Foo;
 }

The thing is, "Test" can of course be seen in the default inspector since it is serialized. But I cannot see it in the Animation Window. Only the Enabled field could be animated.

alt text

I tested this with the most recent version of Unity(5.6) and an older version (5.3).

Is it possible to get the field in the Backend class into the animation window? I need to animate the field "Test". Is there maybe an attribute that I might missed?

animationexample.png (70.1 kB)
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by kornstar83 · Jun 08, 2017 at 12:53 PM

In the Image above you are trying to access the float in the Animation tab, yet your question is about accessing the float in the Animator.

I don't think that the float would be used during the creation of the animation so it shouldn't be relevant in the Animation tab, but in the Animator tab you could use it to change between animations.

Comment
Add comment · Show 3 · 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 kornstar83 · Jun 08, 2017 at 12:56 PM 0
Share

Let me add that I am still just 2 years into program$$anonymous$$g, and about 1.5 years using unity, so for all I know maybe you do need to access that float in the animation tab, I just haven't seen anything like that yet but have seen accessing variables from the animator tab

avatar image Zielscheibe · Jun 08, 2017 at 01:01 PM 0
Share

Thanks for pointing out my mistake in the last line. Of course I mean animation window not the animator window. I want to animate the field "Test" in the backend class. Not to use the field as property in a statemachine.

avatar image kornstar83 · Jun 08, 2017 at 01:54 PM 0
Share

ofcourse it wouldn't be that simple.

I decided to go and run some test on my own since this isn't something I have seen before and here are my results.

I added this script to an object in the scene:

 public class GridTest : $$anonymous$$onoBehaviour {
     [System.Serializable]
     public class $$anonymous$$yClass
     {
         public float Test;
     }
         
     public int gridWidth = 1;
     public int gridHeight = 1;
 
     public GameObject testGO;
 
     public bool testBool;
 
     public float testFloat;
 }

I found that not only was the float Test missing from the list in the animation tab but the gridWidth and gridHeight didn't show up either and they arent in custom classes. testGO, testFloat, and testBool all showed up though.

 photo testSS_1.png

Sorry that this doesn't really help you but hopefully it will help someway, somehow.

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

159 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 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

Can I make animations snap to a frame? 1 Answer

How can I define two-dimensional curves? (like: circle) 1 Answer

Objects created in editor tool, fields reset on play and unable to serialize. 2 Answers

How to select an animation clip by index number? 7 Answers

Custom class does not get serialized 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