Summary
[Editor-Only]
If `obj` is a
UnityEngine.GameObject this method casts and returns it.
Or if it is a UnityEngine.Component this method returns its UnityEngine.Component.gameObject and
outputs the `component`.
Otherwise it returns null.
- Assembly
- Weaver
.dll - Namespace
- Weaver
.Editor - Containing Type
- Weaver
Editor Utilities
Syntax
public static GameObject GetGameObject(Object obj, out Component component)
Parameters
| Name | Type | Description |
|---|---|---|
| obj | Object | |
| component | Component |
Return Value
| Type | Description |
|---|---|
| GameObject |