Hey all,
is there/has anyone compiled a list of all the code attributes, that can be used (or at least the ones that are Unity specific)? I’m stumbling upon more and more in different scripts in tutorials as well as other people’s code, but there doesn’t seem to be a document, that would have them all.
Also, it seems like the different scripting languages have different ways to write them, I wonder what functionality is still hidden ![:wink: :wink:](https://emoji.discourse-cdn.com/google/wink.png?v=12)
Maybe a page on the wiki would be cool to have on this… ?
cheers,
Attila
Have to looked at the scripting reference? It contains all of the Unity-specific stuff.
http://unity3d.com/support/documentation/ScriptReference/20_class_hierarchy.html
Yeah, I’ve found a lot of them there (via Search), but scattered around in separate documents. Maybe reordering the Script classes tree in the documentation would help (to clearly show, that these are Attributes)
Also, stuff like ‘DllImport’ is nowhere to be found and general syntax (across languages) isn’t explained either.
Ok, so I have no clue what you are talking about then – stuff that is Unity specific (so not just general .Net and C# attributes) but that isn’t covered in the documentation in related areas?
Can you give an example?
Dllimport is not unity specific, thats .NET / C# / Mono
Monodocs are here:
http://go-mono.com/docs/index.aspx
Most of the Attributes are not Unity-Specific actually.
Unity-specific ones that I can find are:
- RPC
- ContextMenu
- ExecuteInEditMode
- HideInInspector
- RenderBeforeQueues
- RequireComponent
- SerializePrivateVariables
- CustomEditor
- DrawGizmo
- MenuItem
Plus whatever else I forgot.
-Jeremy
This is the stuff I see:
imac1:ScriptReference matthew$ grep "inherits from Attribute" *
AddComponentMenu.html: <span class="text">Class, inherits from Attribute</span>
ContextMenu.html: <span class="text">Class, inherits from Attribute</span>
ExecuteInEditMode.html: <span class="text">Class, inherits from Attribute</span>
HideInInspector.html: <span class="text">Class, inherits from Attribute</span>
NonSerialized.html: <span class="text">Class, inherits from Attribute</span>
RPC.html: <span class="text">Class, inherits from Attribute</span>
RenderBeforeQueues.html: <span class="text">Class, inherits from Attribute</span>
RequireComponent.html: <span class="text">Class, inherits from Attribute</span>
Serializable.html: <span class="text">Class, inherits from Attribute</span>