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 EditorExtensions

    Extension methods for Unity Editor

    Inheritance
    System.Object
    EditorExtensions
    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.Editor
    Assembly: cs.temp.dll.dll
    Syntax
    public static class EditorExtensions

    Methods

    AddLayer(String)

    Adds a layer programmatically.

    Declaration
    public static void AddLayer(string layer)
    Parameters
    Type Name Description
    System.String layer

    AddTag(String)

    Adds a tag programmatically.

    Declaration
    public static void AddTag(string tag)
    Parameters
    Type Name Description
    System.String tag

    CenterOnEditor(EditorWindow)

    Centers the given EditorWindow relatively to the main Unity Editor

    Declaration
    public static void CenterOnEditor(this EditorWindow editorWindow)
    Parameters
    Type Name Description
    EditorWindow editorWindow

    ConvertHSLtoRGB(Single, Single, Single)

    Given H,S,L in range of 0-1. Returns a Color (RGB struct) in range of 0-255.

    Declaration
    public static Color ConvertHSLtoRGB(float hue, float saturation, float luminosity)
    Parameters
    Type Name Description
    System.Single hue
    System.Single saturation
    System.Single luminosity
    Returns
    Type Description
    Color

    CreateAsset<TUnityObject>(TUnityObject, String)

    Declaration
    public static void CreateAsset<TUnityObject>(this TUnityObject unityObject, string path)
        where TUnityObject : UnityEngine.Object
    Parameters
    Type Name Description
    TUnityObject unityObject
    System.String path
    Type Parameters
    Name Description
    TUnityObject

    CreateAsset<TScriptableObject>(String)

    Creates an instance of a ScriptableObject, as well as creating an Asset for it at the active object location

    Declaration
    public static TScriptableObject CreateAsset<TScriptableObject>(string assetName = null)
        where TScriptableObject : ScriptableObject
    Parameters
    Type Name Description
    System.String assetName
    Returns
    Type Description
    TScriptableObject
    Type Parameters
    Name Description
    TScriptableObject

    CreatePrefab(GameObject, String, IList<UnityEngine.Object>)

    Creates an Unity prefab from a GameObject and dependencies

    Declaration
    public static GameObject CreatePrefab(this GameObject gameObject, string path, IList<UnityEngine.Object> dependencies = null)
    Parameters
    Type Name Description
    GameObject gameObject

    Root GameObject to save a prefab

    System.String path

    Path to the prefab without extension (Asset/..../MyPrefab)

    System.Collections.Generic.IList<UnityEngine.Object> dependencies

    Dependencies to save inside the prefab

    Returns
    Type Description
    GameObject

    GetEditor<TEditor>(ScriptableObject)

    Declaration
    public static TEditor GetEditor<TEditor>(this ScriptableObject scriptableObject)
        where TEditor : UnityEditor.Editor
    Parameters
    Type Name Description
    ScriptableObject scriptableObject
    Returns
    Type Description
    TEditor
    Type Parameters
    Name Description
    TEditor

    GetEditorMainWindowPos()

    Gets the main Unity Editor position and size

    Declaration
    public static Rect GetEditorMainWindowPos()
    Returns
    Type Description
    Rect

    GetEditorWindow(Type, Boolean, String)

    Returns an editor window.

    Declaration
    public static EditorWindow GetEditorWindow(Type type, bool utility, string windowTitle)
    Parameters
    Type Name Description
    System.Type type
    System.Boolean utility

    If true, a floating window is created. If false, a normal window is created

    System.String windowTitle
    Returns
    Type Description
    EditorWindow

    GetGUID(UnityEngine.Object)

    Returns the GUID of a UnityObject. Returns null if the object isn't Serialized.

    Declaration
    public static string GetGUID(this UnityEngine.Object unityObject)
    Parameters
    Type Name Description
    UnityEngine.Object unityObject
    Returns
    Type Description
    System.String

    GetLayers()

    Returns all defined layers.

    Declaration
    public static HashSet<string> GetLayers()
    Returns
    Type Description
    HashSet<System.String>

    GetTags()

    Returns all defined tags.

    Declaration
    public static HashSet<string> GetTags()
    Returns
    Type Description
    HashSet<System.String>

    GetTextures(Material)

    Returns unique textures used in a given material.

    Declaration
    public static HashSet<Texture> GetTextures(this Material material)
    Parameters
    Type Name Description
    Material material
    Returns
    Type Description
    HashSet<Texture>

    GetTooltipText<T>(String)

    Uses reflection to return a tooltip of given field of a given type.

    Declaration
    public static string GetTooltipText<T>(string field)
    Parameters
    Type Name Description
    System.String field

    Field name

    Returns
    Type Description
    System.String
    Type Parameters
    Name Description
    T

    Type containing the field

    GetUnityObject<T>(String)

    Returns an UnityObject from a GUID. Will return null if object isn't Serialized.

    Declaration
    public static T GetUnityObject<T>(string guid)
        where T : UnityEngine.Object
    Parameters
    Type Name Description
    System.String guid
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    GetVolatileDependencies(GameObject)

    Returns all non persistent (also called volatile) dependencies from a given GameObject and it's children recursively.

    Declaration
    public static UnityEngine.Object[] GetVolatileDependencies(this GameObject gameObject)
    Parameters
    Type Name Description
    GameObject gameObject
    Returns
    Type Description
    UnityEngine.Object[]

    GetVolatileDependencies(IList<GameObject>)

    Returns all non persistent (also called volatile) dependencies from given GameObjects.

    Declaration
    public static UnityEngine.Object[] GetVolatileDependencies(this IList<GameObject> gameObjects)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<GameObject> gameObjects
    Returns
    Type Description
    UnityEngine.Object[]

    GetVolatileDependenciesRearranged(IList<GameObject>)

    Returns all non persistent (also called volatile) dependencies from given GameObjects.

    Declaration
    public static LookupTable<string, UnityEngine.Object> GetVolatileDependenciesRearranged(this IList<GameObject> gameObjects)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<GameObject> gameObjects
    Returns
    Type Description
    LookupTable<System.String, UnityEngine.Object>

    IsSerialized(UnityEngine.Object)

    Declaration
    public static bool IsSerialized(this UnityEngine.Object unityObject)
    Parameters
    Type Name Description
    UnityEngine.Object unityObject
    Returns
    Type Description
    System.Boolean

    OpenWindow<TEditorWindow>()

    Opens an editor window

    Declaration
    public static TEditorWindow OpenWindow<TEditorWindow>()
        where TEditorWindow : SingletonEditorWindow
    Returns
    Type Description
    TEditorWindow
    Type Parameters
    Name Description
    TEditorWindow

    SaveAsset(ScriptableObject, String, Boolean, String)

    Saves a ScriptableObject as an Asset.

    Declaration
    public static void SaveAsset(this ScriptableObject scriptableObject, string assetName, bool focusOnSave = false, string path = null)
    Parameters
    Type Name Description
    ScriptableObject scriptableObject
    System.String assetName

    Asset name (which will be the file name without .asset extension)

    System.Boolean focusOnSave
    System.String path

    SelectFile(String[])

    Opens a browser to select a file

    Declaration
    public static string SelectFile(string[] filter)
    Parameters
    Type Name Description
    System.String[] filter
    Returns
    Type Description
    System.String
    Back to top PiXYZ Plugin for Unity 2019.1