Skip to main content

SABoneCollider

A class in Root.Township, the global namespace.

Editor tool component (from the SAColliderBuilder asset) that holds settings for generating colliders on a bone, and marks the object's name with * or + when it or its children were edited.

Constructors​

MemberWhat it is
SABoneCollider()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

MemberWhat it is
SABoneColliderCommon.SABoneColliderProperty boneColliderPropertyAll collider-building settings for this bone.
bool cleanupModifiedEditor flag, not saved.
SABoneColliderCommon.SABoneColliderProperty defaultBoneColliderPropertyThe settings to go back to on reset.
string defaultNameThe object's name without the modified marker.
SABoneColliderCommon.SABoneColliderProperty edittingBoneColliderPropertySettings being edited in the inspector. Not saved.
bool isDebugEditor debug flag, not saved.
bool modifiedTrue if this bone's settings were changed from the defaults.
bool modifiedChildrenTrue if a child bone's settings were changed.

Properties​

MemberWhat it is
SABoneColliderCommon.BoneProperty boneProperty { get; }Bone part of the settings, or null.
SAColliderBuilderCommon.ColliderProperty colliderProperty { get; }Collider part of the settings, or null.
bool modifyNameEnalbed { get; }Whether the name marker is used (misspelled in the asset).
bool recursivery { get; }Whether the settings also apply to child bones (misspelled in the asset).
SAColliderBuilderCommon.ReducerProperty reducerProperty { get; }Mesh reducer part of the settings, or null.
SAColliderBuilderCommon.RigidbodyProperty rigidbodyProperty { get; }Rigidbody part of the settings, or null.
SABoneColliderCommon.SplitProperty splitProperty { get; }Split part of the settings, or null.

Methods​

MemberWhat it is
string _ComputeModifyName()The base name with * when modified, + when only children are modified.
bool _IsModifyName()True if the object's current name equals the computed name.
void ChangeDefaultName(string defaultName)Sets the base name and renames the object if it still had the computed name.
void ChangeModified(bool modified)Sets the modified flag and updates the name marker.
void ChangeModifiedChildren(bool modifiedChildren)Sets the children-modified flag and updates the name marker.
void ResetModified()Clears both modified flags and updates the name marker.
void ResetModifyName()Renames the object to the computed name, if the marker is enabled.