FMEditorUtilities Class

Summary

[Editor-Only] Utilities used throughout FlexiMotion.FlexiMotionComponent.
Assembly
FlexiMotion.dll
Namespace
FlexiMotion.Editor
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["FMEditorUtilities"] class Type type-node

Syntax

public static class FMEditorUtilities

Fields

Name Constant Value Summary
ContextMenuPrefix CONTEXT/FlexiMotionComponent/FlexiMotionComponent/
The path prefix to use for FlexiMotion.FlexiMotionComponent context menu functions.
static
ContextMenuPriority 1
The UnityEditor.MenuItem.priority to use for FlexiMotion.FlexiMotionComponent context menu functions.
static
TransformTreeWindowAutoApplyPref TransformTreeWindowAutoApply
The UnityEditor.EditorPrefs key for the "Auto Apply" toggle in the FlexiMotion.Editor.TransformTreeWindow`2.
static

Properties

Name Value Summary
TransformTreeWindowAutoApply bool
Is the "Auto Apply" toggle in the FlexiMotion.Editor.TransformTreeWindow`2 currently enabled?
static

Methods

Name Value Summary
AddParents(Transform, Transform, HashSet<Transform>) void
Adds the `transform` and all its parents up to the `root` to the `transforms`.
static
DestroyUselessObjects(IFlexiMotionComponent) void
Destroys any children of the `target` which have no custom components and no incluence on the model. This includes editing any skinned meshes to account for removed bones.
static
DisplayDialog(string, string) bool
Calls UnityEditor.EditorUtility.DisplayDialog(System.String,System.String,System.String,System.String) with the `operation` as the accept button and a "Cancel" button.
static
ExtractTextures(GameObject) void
Copies any textures in the prefab out to PNGs in a folder next to it.
static
GatherHumanoidBones(HashSet<Transform>, Transform, Animator) void
Adds all available UnityEngine.HumanBodyBones to the `bones`.
static
GatherSkinnedBones(HashSet<Transform>, Transform, SkinnedMeshRenderer[], List<Matrix4x4>[], NativeArray<BoneWeight1>[], Transform[]) void
Adds all bones that incluence skinned meshes to the `bones`.
static
IsNotEditable(HideFlags) bool
Do the flags include UnityEngine.HideFlags.NotEditable?
static
IsNullOrDestroyed(Object) bool
If the `obj` null or a destroyed UnityEngine.Object?
static
PullInSubAssets(GameObject) void
Copies the avatar, meshes, materials, and textures into the `prefab` as sub-assets.
static
RenameBones(GameObject, Func<string, string>) void
Renames all animated bones in the `prefab`.
static
RenameBonesValidate(GameObject, Animator) string
Returns an error if the `prefab` doesn't have an UnityEngine.Animator and UnityEngine.Avatar which can have their bones renamed.
static
RenameTextures(GameObject, Func<string, string>) bool
Renames all textures used by materials in renderers in the `prefab`.
static
TryGetPrefab(Component, GameObject) bool
Tries to get the prefab asset associated with `componentInPrefab` and returns true if successful.
static