• RuntimesUnityBugs
  • SkeletonRenderSeperator Part Renderers Naming Issuie.

When I use SkeletonRenderSeparator in Unity, the generated parts are named as 1, 2, 3, etc. How can I rename these parts according to the bone names listed in the separator slot names section? It’s hard to proceed without knowing which part corresponds to what. What should I do to properly align the part names with their respective bones?

    Related Discussions
    ...

    The SkeletonRenderSeparator component in Unity does not automatically name the generated SkeletonPartsRenderer GameObjects based on the bone names listed in the separator slot names section. The parts are named numerically (1, 2, 3, etc.) by default. To align the part names with their respective bones, you will need to manually rename the SkeletonPartsRenderer GameObjects in the Unity hierarchy after they are created. This can be done by selecting each part in the hierarchy and renaming it to match the corresponding bone or slot name you have specified in the separator slots.

    To make this process easier, you can follow these steps:

    1. Identify the separator slots you have set up in the SkeletonRenderSeparator component.
    2. After the parts are generated, select each SkeletonPartsRenderer GameObject in the Unity hierarchy.
    3. Rename each part to reflect the bone or slot it corresponds to, based on your separator slots setup.

    This manual renaming will help you keep track of which part corresponds to which bone or slot, making it easier to manage your character's rendering order.

      Spinebot When I import a more advanced version of the character into my project and update the skeleton data, the objects in the separator slot are randomly generated again and renamed with numbers like 1, 2, 3. I don’t want to manually rename them one by one every time until the project is finished. What should I do to avoid this issue?

      In general please consider whether splitting a single skeleton into roughly 40 parts is really necessary, as it might lead to a lot of overhead, lots of additional draw calls for a single skeleton (unless they are all reduced by batching later).

      meanwhile How can I rename these parts according to the bone names listed in the separator slot names section?

      Note that draw order, slot visibility and skin-bones might change separation at any frame during playback, there is no guarantee for constant parts renderer order here.

      Imagine having the following draw order with separator slots S1, S2, S3:

      A
      S1
      B
      S2
      C
      S3
      D

      The 4 parts will be:
      [A, S1] part 1
      [B, S2] part 2
      [C, S3] part 3
      [D] part 4

      Compare it to:

      A
      B
      S2
      C
      S1
      D
      S3

      The three parts will be:
      [A, B, S2] part 1
      [C, S1] part 2
      [D, S3] part 3
      Note that the parts count has changed from 4 to 3, and part 1 is now split by S2 instead of S1 (would be renamed in your use-case). The SkeletonRenderer component constantly updates the parts renderers accordingly, which might mess with your renaming setup.

      If you have a special use-case and ensure that draw order and slot visibility never changes, you might want to either write your own SkeletonRenderSeparator subclass, or modify the spine-unity source code according to your needs.