I have a script 'Example.cs' with a list declared in it. Then I'm trying to access it through another script (Test.cs).
public class Test : MonoBehaviour
public Example ex = GameObject.Find("Test").GetComponent<Example>();
private List<Example> = ex.RotationTimeline;
but I'm getting 2 errors:
Assets/ReorderableList/Example/Test.cs(9,25): error CS1519: Unexpected symbol =' in class, struct, or interface member declaration and Assets/ReorderableList/Example/Test.cs(9,46): error CS1519: Unexpected symbol ;' in class, struct, or interface member declaration
=' in class, struct, or interface member declaration and Assets/ReorderableList/Example/Test.cs(9,46): error CS1519: Unexpected symbol
anyone can help me out?
Answer by ninja_gear
Feb 26 at 04:48 PM
U have no name for your private list of examples.
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
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.
Answers and Comments
92 People are following this question.
Concat() for Lists
Object not set to an instance of an object?? why?
A node in a childnode?
2D GameObject Array to 2D List
Cannot convert float to int when only using floats (C#)