Click or drag to resize

GameObjectExtensions Class

Extension methods for Unity's UnityEngine.GameObject
Inheritance Hierarchy
SystemObject
  ImmerseSDK.ExtensionsGameObjectExtensions

Namespace:  ImmerseSDK.Extensions
Assembly:  ImmerseSDK.App (in ImmerseSDK.App.dll) Version: 3.9.0.0 (3.9.0.0)
Syntax
C#
public static class GameObjectExtensions

The GameObjectExtensions type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAddComponentCopy
Adds a copy of a particular component
Public methodStatic memberAddOrGetComponentT
Tries to get a component of type T, if none is found, one will be added
Public methodStatic memberAddToChildrenT
Adds a component to all children
Public methodStatic memberDisableLightProbesRecursive
Disabled all light probes on all Renderers within a GameObject
Public methodStatic memberFindChildRecursively
Search for a child transform within the parent transform's entire hierarchy
Public methodStatic memberGetBounds
Get the bounds of a GameObject, using attached colliders
Public methodStatic memberGetChildren
Get all children of a transform as an array
Public methodStatic memberGetComponentInParentRecursiveT(GameObject)
Searches for a Component of type T upwards in the transform's hierarchy
Public methodStatic memberGetComponentInParentRecursiveT(GameObject, FuncT, Boolean)
Searches for a Component of type T upwards in the transform's hierarchy
Public methodStatic memberGetTopMostComponentT(GameObject)
Traverses the gameObject hierarchy upwards (via parents) to find the topmost instance of the script
Public methodStatic memberGetTopMostComponentT(GameObject, FuncT, Boolean)
Traverses the gameObject hierarchy upwards (via parents) to find the topmost instance of the script
Public methodStatic memberSetLayerRecursive
Sets the layer for a GameObject and all it's children
Top
See Also