Version: 
  • C# API

    Show / Hide Table of Contents
    • PiXYZ
      • CoreLoadingException
      • NoValidLicenseException
      • OutOfTermsException
      • PiXYZDefinesManager
      • PiXYZException
    • PiXYZ.Config
      • Compatibility
      • Configuration
      • LicenseServer
      • Token
      • WebLicense
    • PiXYZ.Editor
      • AboutWindow
      • ColoredTheme
      • ColorType
      • DispatcherEditor
      • EditorExtensions
      • EditorGUIExtensions
      • IProgressBar
      • LicensingWindow
      • NonPersistentSerializer
      • PrefabDependenciesDestination
      • Preferences
      • ProgressBar
      • ScriptedImporterBehaviour
      • SingletonEditorWindow
      • StaticStyles
      • TextureCache
      • UpdateWindow
    • PiXYZ.Import
      • ExceptionHandler
      • Formats
      • Importer
      • ImportSettings
      • ImportSettingsTemplate
      • ImportStamp
      • LodGenerationSettings
      • LodGroupPlacement
      • LodQuality
      • LodsGenerationSettings
      • Metadata
      • Parameter<T>
      • ParameterAvailability
      • SubProcess
      • TransformVariant
      • VariantSets
      • VariantSets.MaterialSet
      • VariantSets.Set
      • VariantSets.Set<T, U>
      • VariantSets.TransformSet
      • VariantSets.VariantGroup
      • VariantSets.VariantSet
      • VariantSets.VariantStructure
      • VariantsManager
      • VariantsManager.MaterialSwitch
      • VariantsManager.Switch
      • VariantsManager.Switch<T>
      • VariantsManager.TransformSwitch
    • PiXYZ.Import.Editor
      • DropInSceneImporter
      • ImportSettingsEditor
      • ImportStampEditor
      • ImportWindow
      • LODsSettingsDrawer
      • MetadataEditor
      • PostProcessor
      • PostprocessVRED
      • PreprocessVRED
      • ScriptedImporter
      • ScriptedImporterAttribute
      • ScriptedImporterEditor
    • PiXYZ.Tools
      • ActionBase
      • ActionIn<Input>
      • ActionInOut<Input, Output>
      • ActionOut<Output>
      • FieldInstance
      • FieldInstanceSerializer
      • FilterParameter
      • FreePassAction
      • HelperMethod
      • IRenamable
      • PrefabModificationException
      • Rule
      • RuleBlock
      • RuleSet
      • ToolboxMenuItems
      • ToolsBase
      • UserParameter
    • PiXYZ.Tools.Builtin
      • AddChild
      • AddChild.Placement
      • AddCollider
      • AddCollider.ColliderType
      • AddLight
      • AddRigidbody
      • CreateLightmapUVs
      • CreateNormals
      • CreateUVs
      • Decimate
      • Decimate.DecimationCriterion
      • Decimate.DecimationQuality
      • Delete
      • ExplodeSubmeshes
      • FilterOnLayer
      • FilterOnMaterial
      • FilterOnMaterial.StringConstrain
      • FilterOnMetadata
      • FilterOnMetadata.PropName
      • FilterOnMetadata.PropName.PropertyNameConstrain
      • FilterOnMetadata.PropValue
      • FilterOnMetadata.PropValue.PropertyValueConstrain
      • FilterOnName
      • FilterOnName.StringConstrain
      • FilterOnPosition
      • FilterOnPosition.BoundsCondition
      • FilterOnTag
      • FlipNormals
      • GetAllGameObjects
      • GetChildAt
      • GetChildren
      • GetGameObject
      • GetImportedModel
      • GetLatestImportedModel
      • GetSelectedGameObjects
      • Merge
      • MoveOrigin
      • MoveOrigin.MovePivotOption
      • PrintGameObjectsInfo
      • PrintMaterialsInfo
      • PrintMeshesInfo
      • RandomizeTransform
      • RemoveHidden
      • RemoveHidden.SelectionLevelUnity
      • RepairMesh
      • ReplaceBy
      • ReplaceBy.ReplaceByMode
      • Retopologize
      • Retopologize.MeshReconstructionQuality
      • Retopologize.RetopologyMode
      • SetAsStatic
      • SetEnabled
      • SetLayer
      • SetMaterial
      • SetMesh
      • SetMetadata
      • SetName
      • SetPosition
      • SetPosition.Referential
      • SetTag
      • SwitchMaterials
      • SwitchMaterials.CopyReplace
      • SwitchMaterials.MaterialRemplacement
      • TextureQuality
    • PiXYZ.Tools.Editor
      • CoreContext
      • FieldInstanceDrawer
      • RenamePopup
      • RuleEngineMenu
      • RuleSetEditor
      • RuleSetWindow
      • Toolbox
      • ToolboxWindow
      • ToolsEditor
    • PiXYZ.Utils
      • BaseExtensions
      • CollectionExtensions
      • Dispatcher
      • Dispatcher.DelayedAction
      • Dispatcher.DelayFramesDispatch
      • Dispatcher.GoMainThreadDispatch
      • Dispatcher.GoThreadPoolDispatch
      • Dispatcher.SleepForSecondsDispatch
      • Dispatcher.WaitForSecondsDispatch
      • Dispatcher.YieldInstruction
      • DynamicEnum
      • FilePath
      • FloatingMesh
      • GameObjectToVoidHandler
      • GenericRenderer
      • LookupTable<K, V>
      • MergingContainer
      • MeshExtensions
      • Profiler
      • Profiling
      • ProgressHandler
      • Range
      • ReflectionExtensions
      • SceneExtensions
      • StringToStringHandler
      • TextureScaler
      • ThreadQueue
      • TypePathToUnityObject
      • UnityObjectToStringHandler
      • UnityObjectToUnityObjectHandler
      • VerticesData
      • VoidHandler

    Class SceneExtensions

    Inheritance
    System.Object
    SceneExtensions
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: PiXYZ.Utils
    Assembly: cs.temp.dll.dll
    Syntax
    public static class SceneExtensions

    Methods

    DestroyImmediateSafe(GameObject)

    Destroys GameObject, but ensure that it is properly unpacked if gameobject is part of a prefab (if editor)

    Declaration
    public static void DestroyImmediateSafe(this GameObject gameObject)
    Parameters
    Type Name Description
    GameObject gameObject

    ExplodeSubmeshes(GameObject, Boolean)

    Explodes submeshes from a given GameObject into multiple child GameObjects.

    Declaration
    public static List<GameObject> ExplodeSubmeshes(this GameObject gameObject, bool firstSubmeshAsParent)
    Parameters
    Type Name Description
    GameObject gameObject
    System.Boolean firstSubmeshAsParent

    If true, the first submesh will stay in the gameObject's mesh. Otherwise, one child GameObject is created per submesh and the original meshfilter and renderers gets destroyed.

    Returns
    Type Description
    System.Collections.Generic.List<GameObject>

    GetBoundsWorldSpace(GameObject, Boolean)

    Returns bounds in world space

    Declaration
    public static Bounds GetBoundsWorldSpace(this GameObject gameObject, bool includeChildren)
    Parameters
    Type Name Description
    GameObject gameObject

    Object to take bounds from

    System.Boolean includeChildren
    Returns
    Type Description
    Bounds

    GetBoundsWorldSpace(IList<GameObject>)

    Returns bounds in world space

    Declaration
    public static Bounds GetBoundsWorldSpace(this IList<GameObject> gameObjects)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<GameObject> gameObjects
    Returns
    Type Description
    Bounds

    GetChildren(GameObject, Boolean, Boolean)

    Returns all children (recursive) of given GameObjects

    Declaration
    public static List<GameObject> GetChildren(this GameObject gameObject, bool recursive, bool includeParent)
    Parameters
    Type Name Description
    GameObject gameObject
    System.Boolean recursive

    If true, it will gather children recursively

    System.Boolean includeParent

    If true, input GameObject will be present in the output

    Returns
    Type Description
    System.Collections.Generic.List<GameObject>

    GetChildren(IList<GameObject>, Boolean, Boolean)

    Returns all children (recursive) of given GameObjects

    Declaration
    public static IList<GameObject> GetChildren(this IList<GameObject> gameObjects, bool recursive, bool includeParent)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<GameObject> gameObjects

    Input GameObjects

    System.Boolean recursive

    If true, it will gather children recursively

    System.Boolean includeParent

    If true, input GameObjects will be present in the output

    Returns
    Type Description
    System.Collections.Generic.IList<GameObject>

    GetDefaultShader()

    Declaration
    public static Shader GetDefaultShader()
    Returns
    Type Description
    Shader

    GetGameObjectsInLayer(Int32)

    Returns all GameObjects in given layer

    Declaration
    public static List<GameObject> GetGameObjectsInLayer(int layer)
    Parameters
    Type Name Description
    System.Int32 layer
    Returns
    Type Description
    System.Collections.Generic.List<GameObject>

    GetHighestAncestor(IList<GameObject>)

    Returns the highest ancestor (hierarchically) of a list of GameObjects

    Declaration
    public static GameObject GetHighestAncestor(IList<GameObject> gameObjects)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<GameObject> gameObjects
    Returns
    Type Description
    GameObject

    GetMaterials(IList<GameObject>)

    Returns an array of unique materials from given GameObjects

    Declaration
    public static Material[] GetMaterials(this IList<GameObject> input)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<GameObject> input
    Returns
    Type Description
    Material[]

    GetMesh(GameObject)

    Declaration
    public static Mesh GetMesh(this GameObject gameObject)
    Parameters
    Type Name Description
    GameObject gameObject
    Returns
    Type Description
    Mesh

    GetMeshes(IList<GameObject>)

    Declaration
    public static Mesh[] GetMeshes(this IList<GameObject> input)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<GameObject> input
    Returns
    Type Description
    Mesh[]

    GetMeshesUnique(IList<GameObject>)

    Returns an array of unique meshes from given GameObjects.

    Declaration
    public static Mesh[] GetMeshesUnique(this IList<GameObject> input)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<GameObject> input
    Returns
    Type Description
    Mesh[]

    GetOrAddComponent<T>(GameObject)

    Returns the Component of the given type. It will add a new one if it doesn't exists.

    Declaration
    public static T GetOrAddComponent<T>(this GameObject gameObject)
        where T : Component
    Parameters
    Type Name Description
    GameObject gameObject

    GameObject

    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    Component Type

    GetRenderers(IList<GameObject>)

    Returns an array of renderers from given GameObjects.

    Declaration
    public static Renderer[] GetRenderers(this IList<GameObject> input)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<GameObject> input
    Returns
    Type Description
    Renderer[]

    Instantiate(GameObject)

    Context adapted delegate for instantiating Unity Objects. In runtime, it will create a clone. In editor, it will instantiate the prefab.

    Declaration
    public static GameObject Instantiate(GameObject gameObject)
    Parameters
    Type Name Description
    GameObject gameObject
    Returns
    Type Description
    GameObject

    LocalIsIdentity(Transform)

    Check if the localPosition is Vector3(0,0,0), localRotation is Identity and localScale is Vector(1,1,1)

    Declaration
    public static bool LocalIsIdentity(this Transform transform)
    Parameters
    Type Name Description
    Transform transform
    Returns
    Type Description
    System.Boolean

    MergeChildren(GameObject)

    Merge children (recursively) of given GameObject. If given GameObject has no mesh or renderer, this method will create it with the merged content inside.

    Declaration
    public static void MergeChildren(this GameObject gameObject)
    Parameters
    Type Name Description
    GameObject gameObject

    SetParentSafe(Transform, Transform, Boolean)

    Change Tranform's parent, but ensures it is properly unpack if transform is part of a prefab (if editor)

    Declaration
    public static void SetParentSafe(this Transform transform, Transform parent, bool worldPositionStays = true)
    Parameters
    Type Name Description
    Transform transform
    Transform parent
    System.Boolean worldPositionStays
    Back to top PiXYZ Plugin for Unity 2019.1