Version: 5.5
Experimental: this API is experimental and might be changed or removed in the future.

AnimatorControllerPlayable.CastTo

매뉴얼로 전환
public T CastTo ();

반환

T Returns the Playable casted to the type specified, throws InvalidCastException if the cast failed.

설명

You can use the CastTo method to perform certain types of conversions between compatible reference types or nullable types.

Some Playables are implemented as internal C++ objects but are exposed as C# structs. This is to allow the possibility of creating Playable graphs without allocating GC memory in your C# scripts. One down side of using structs as opposed to classes, is that struct in C# do not support inheritance. The CastTo method allows you to convert a C# Playable into one of it's "derived C++ class".