Skip to content

Commit a2d9006

Browse files
authored
Merge pull request #73 from CyberAgentGameEntertainment/feature/readme
README for CompositeLayoutRuleData
2 parents bab7db2 + ceff0d9 commit a2d9006

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ And it also has the version management feature to exclude pre-release assets fro
6161
- [Create your own Asset Filters / Providers](#create-your-own-asset-filters--providers)
6262
- [Create your own Asset Filter](#create-your-own-asset-filter)
6363
- [Create your own Provider](#create-your-own-provider)
64+
- [Seamlessly Managing Multiple LayoutRuleData Assets](#seamlessly-managing-multiple-layoutruledata-assets)
65+
- [How to Use](#how-to-use)
66+
- [Validation](#validation-1)
6467
- [License](#license)
6568

6669
</details>
@@ -769,6 +772,24 @@ Finally, press the **Change Provider** button of each **Provider** in **Layout R
769772
<img width="80%" src="Documentation/Images/custom_filter_provider_02.png" alt="Custom Provider">
770773
</p>
771774

775+
## Seamlessly Managing Multiple LayoutRuleData Assets
776+
777+
**CompositeLayoutRuleData** provides a way to transparently manage multiple `LayoutRuleData` assets, integrating and applying their layout rules as a single unit. When you apply a `CompositeLayoutRuleData` asset, all the layout rules from its configured `LayoutRuleData` assets are combined and applied together.
778+
779+
### How to Use
780+
781+
To create a `CompositeLayoutRuleData` asset, go to the Unity Editor menu and select **Assets > Create > Smart Addresser > Composite Layout Rule Data**.
782+
783+
Once created, open the `CompositeLayoutRuleData` asset in the Inspector view. Here, you can configure the `Layout Rules` list by adding the `LayoutRuleData` assets you wish to integrate.
784+
785+
To apply all the configured layout rules, simply click the **Apply** button at the top of the Inspector view. You can also set a `CompositeLayoutRuleData` asset as the `PrimaryData`, just like a regular `LayoutRuleData` asset.
786+
787+
### Validation
788+
789+
Validation can only be performed on individual `LayoutRuleData` assets. The `CompositeLayoutRuleData` itself does not detect conflicts or contradictions between multiple `LayoutRuleData` assets configured within it.
790+
791+
Validation result files will be suffixed based on the index of the `LayoutRuleData` within the `CompositeLayoutRuleData`, for example: `[filename]_0.json`, `[filename]_1.json`, and so on.
792+
772793
## License
773794
This software is released under the MIT license.
774795
You are free to use it within the scope of the license, but the following copyright and license notices are required.

README_JA.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@
6464
- [独自のアセットフィルタ、プロバイダを作成する](#%E7%8B%AC%E8%87%AA%E3%81%AE%E3%82%A2%E3%82%BB%E3%83%83%E3%83%88%E3%83%95%E3%82%A3%E3%83%AB%E3%82%BF%E3%83%97%E3%83%AD%E3%83%90%E3%82%A4%E3%83%80%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B)
6565
- [独自のアセットフィルタを作成する](#%E7%8B%AC%E8%87%AA%E3%81%AE%E3%82%A2%E3%82%BB%E3%83%83%E3%83%88%E3%83%95%E3%82%A3%E3%83%AB%E3%82%BF%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B)
6666
- [独自のプロバイダを作成する](#%E7%8B%AC%E8%87%AA%E3%81%AE%E3%83%97%E3%83%AD%E3%83%90%E3%82%A4%E3%83%80%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B)
67+
- [複数のLayoutRuleDataを透過的に扱う](#%E8%A4%87%E6%95%B0%E3%81%AElayoutruledata%E3%82%92%E9%80%8F%E9%81%8E%E7%9A%84%E3%81%AB%E6%89%B1%E3%81%86)
68+
- [使い方](#%E4%BD%BF%E3%81%84%E6%96%B9)
69+
- [バリデーション](#%E3%83%90%E3%83%AA%E3%83%87%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3)
6770
- [ライセンス](#%E3%83%A9%E3%82%A4%E3%82%BB%E3%83%B3%E3%82%B9)
6871

6972
</details>
@@ -773,6 +776,23 @@ public sealed class ExampleAddressProvider : AddressProviderAsset
773776
<img width="80%" src="Documentation/Images/custom_filter_provider_02.png" alt="Custom Provider">
774777
</p>
775778

779+
## 複数のLayoutRuleDataを透過的に扱う
780+
CompositeLayoutRuleData は、複数の LayoutRuleData を透過的に管理し、それらのレイアウトルールをまとめて適用するための機能です。
781+
CompositeLayoutRuleData を適用すると、それに設定されている全ての LayoutRuleData のレイアウトルールが一括で適用されます。
782+
783+
### 使い方
784+
Unityエディタのメニューから **Assets > Create > Smart Addresser > Composite Layout Rule Data** を選択し、アセットを作成します。
785+
作成した CompositeLayoutRuleData アセットの Inspector ビューで、Layout Rules リストにまとめて適用したい LayoutRuleData アセットを設定します。
786+
787+
Inspector ビュー上部にある Apply ボタンをクリックすると、設定した全てのレイアウトルールを適用します。
788+
PrimaryData については、通常の LayoutRuleData と同様に CompositeLayoutRuleData を設定することが可能です。
789+
790+
### バリデーション
791+
バリデーションは、個々の LayoutRuleData 単位でのみ実行可能です。
792+
CompositeLayoutRuleData に設定された複数の LayoutRuleData 間で、互いに矛盾するレイアウトルールが存在する場合、CompositeLayoutRuleData 自体ではその矛盾は検知されません。
793+
794+
バリデーション結果ファイルは、CompositeLayoutRuleData が持つ LayoutRuleData のインデックスに基づき、`[ファイル名]_0.json``[ファイル名]_1.json`のようにサフィックスが付与されます。
795+
776796
## ライセンス
777797
本ソフトウェアはMITライセンスで公開しています。
778798
ライセンスの範囲内で自由に使っていただけますが、使用の際は以下の著作権表示とライセンス表示が必須となります。

0 commit comments

Comments
 (0)