AnimancerEditorUtilities.

GetNameCS(Type, bool) Method

Summary

Returns the name of a `type` as it would appear in C# code.
Assembly
Animancer.dll
Namespace
Animancer.Editor
Containing Type
AnimancerEditorUtilities

Syntax

public static string GetNameCS(this Type type, bool fullName = true)

Examples

typeof(List<float>).FullName would give you: System.Collections.Generic.List`1[[System.Single, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]

This method would instead return System.Collections.Generic.List<float> if `fullName` is true, or just List<float> if it is false.

Remarks

Returned values are stored in a dictionary to speed up repeated use.

Parameters

Name Type Description
type Type
fullName bool

Return Value

Type Description
string