2using System.Collections;
10 public static class pb_ComponentExtension
22 Debug.LogError(component.
type +
" does not inherit UnityEngine.Component!");
36 public static T DemandComponent<T>(
this GameObject go) where T :
UnityEngine.Component
38 T component = go?.GetComponent<T>();
41 component = go?.AddComponent<T>();
UnityEngine.Component Component
void ApplyProperties(object obj)
Called after an object is deserialized and constructed to it's base type.
System.Type type
The type of component stored.