ドキュメント

​
​

Development

User Acquisition

Monetization

産業

Asset Transformer SDK

2026.4

サポート対象
​

User Manual

Python API

C# API

Changelog

Discussions

Asset Transformer SDK

2026.4

サポート対象
​

このページは選択した言語では使用できません。
​
​
Get started
  • System requirements
  • Licensing
  • Setup
  • Migrate from Scenario Processor
Framework
  • Framework
  • Preferences
Input/output files
  • Supported formats
  • Import files
  • Export files
  • Export textures
  • CAD vs Mesh
Scene
  • Product structure
  • Occurrence
  • Component
  • Material
  • Image
Algorithms
  • CAD
  • Healing
  • Optimization
  • Combine and bake
  • Reconstruction
  • UVs
Viewer
  • Viewer
Pixyz UI
  • Setup
  • Overview
  • Create a custom UI
Guidelines
  • Data preparation
  • Process point clouds
Debug and diagnose
  • Log files
  • Debug best practices
Other
  • Samples
  • Glossary
  1. Asset Transformer SDK (ex Pixyz)

Product structure

Use this feature to manage and manipulate the product structure of 3D scenes, including creating hierarchies, sorting occurrences, and optimizing for performance.
読み終わるまでの所要時間 2 分
最終更新 3ヶ月前

API functions:
  • scene.getChildren
  • scene.getParent
  • scene.setParent
  • scene.getOccurrenceName
Product structure is the scene hierarchy of occurrences. It can be seen as a tree where we can go down to the leaf using scene.getChildren and go up to the root using scene.getParent.
We can manipulate this product structure to change order and parenting relations between occurences.
注
The most complex the product structure is, the less performant will be algorithms to search something in the scene. A complex hierarchy can also have an impact in terms of real time rendering performances. Cleaning and simplifying a complex product structure is an important process to export performant 3D assets.

Code example

Create new occurrences

Let's take an example where we create a new product structure from scratch to match the following tree:
Root|- zz|- |- t|- |- n|- a|- b
def createTestProductStructure(): root = scene.getRoot() zz_occurrence = scene.createOccurrence(name="zz", parent=root) t_occurrence = scene.createOccurrence(name="t", parent=zz_occurrence) n_occurrence = scene.createOccurrence(name="n", parent=zz_occurrence) a_occurrence = scene.createOccurrence(name="a", parent=root) b_occurrence = scene.createOccurrence(name="b", parent=root)

Print the hierarchy tree

We want to be able to print the name of each occurrence and have the same representation in the console than the structure described above.
# Go through the product structure using "depth first" recursive methoddef dfPrintOccurrencesName(offset, occurrence): print(offset + scene.getOccurrenceName(occurrence)) offset = offset + " |- " for child in scene.getChildren(occurrence): dfPrintOccurrencesName(offset, child)

Manipulate the product structure

We want to manipulate the created hierarchy to sort the occurrences based on the alphabetical order of their names.
# Sort a product structure based on occurrences name alphabetical orderdef sortOccurrencesRecursively(occurrence): children = scene.getChildren(occurrence) if not children: return names = core.getProperties(children, "Name") # This built-in method retrieve all the names of an occurrence list children_with_names = zip(children, names) sorted_children_with_names = sorted(children_with_names, key=lambda x: x[1]) sorted_children = [child for child, name in sorted_children_with_names] for child in sorted_children: sortRecursively(child) scene.setParent(child, occurrence)

Output

Root|- a|- b|- zz|- |- n|- |- t

Copyright © 2026 Unity Technologies
法規事項プライバシーポリシークッキーDocumentation Terms of Use私の個人情報を販売または共有しないプライバシーに関する選択 (クッキー設定)

"Unity" の名称、Unity のロゴ、およびその他の Unity の商標は、米国およびその他の国における Unity Technologies またはその関係会社の商標または登録商標です (詳しくはこちら)。その他の名称またはブランドは該当する所有者の商標です。

一部のページは利便性向上のため機械翻訳を使用しており、内容に不正確な表現が含まれる場合があります。内容に齟齬または不一致が生じた場合は、英語版を正本とします。

  • このページ
    • Code example

      • Create new occurrences

      • Print the hierarchy tree

      • Manipulate the product structure

        • Output


このページの問題を報告する