Skip to content

Commit

Permalink
Merge pull request #66 from CyberAgentGameEntertainment/feature/updat…
Browse files Browse the repository at this point in the history
…e-doc

エディタAPIに関するリファレンスを追加
  • Loading branch information
CyTakayukiKiyohara committed Feb 7, 2024
2 parents 2e60c76 + 2de6b1f commit b7a9eea
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 0 deletions.
36 changes: 36 additions & 0 deletions Documentation~/RenderErrorHandler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# RenderErrorHandler Class
Utilities that provide error handling for rendering.
## APIs
- [CheckErrorWithMaterial](#CheckErrorWithMaterial)
- [FixErrorWithMaterial](#fixerrorwithmaterial)
## CheckErrorWithMaterial
### Summary
Checks for errors in the Particle System Renderers using the specified material.
### Parameters
|Param|Description|
|---|---|
|material|Material specified for the Particle System Renderers.|

### Return
Returns true if an error has occurred.<br/>


### Code
```C#
if (RendererErrorHandler.CheckErrorWithMaterial(material))
Debug.Log("Errors");
else
Debug.Log("No Errors");
```
## FixErrorWithMaterial
### Summary
Corrects errors in the Particle System Renderers using the specified material.<br/>

### Parameters
|Param|Description|
|---|---|
|material|Material specified for the Particle System Renderers.|

### Remark
Ignored if the material is not specified in the Particle System Renderers.

38 changes: 38 additions & 0 deletions Documentation~/RenderErrorHandler_JA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# RenderErrorHandler クラス
レンダリングに関するエラーハンドリングを提供するユーティリティです。

## APIs
- [CheckErrorWithMaterial](#CheckErrorWithMaterial)
- [FixErrorWithMaterial](#fixerrorwithmaterial)

## CheckErrorWithMaterial
### 概要
指定されたマテリアルを使用するパーティクルシステムレンダラーのエラーをチェックします。

### 引数
|パラメータ|説明|
|---|---|
|material|ParticleSystemRendererに指定されているマテリアル|

### 戻り値
エラーがある場合はtrueを返します。<br/>

### サンプルコード
```C#
if (RendererErrorHandler.CheckErrorWithMaterial(material))
Debug.Log("Errors");
else
Debug.Log("No Errors");
```
## FixErrorWithMaterial
### 概要
指定されたマテリアルを使用するParticleSystemRendereのエラーを修正します。<br/>

### 引数
|パラメータ|説明|
|---|---|
|material|ParticleSystemRendererに指定されているマテリアル|

### 備考
どのParticleSystemRendererにもマテリアルが指定されていない場合はこのメソッドは何もしません。

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ For more information, please refer to the following documents, [Samples](Assets/
- [Set up the Custom Vertex Streams](#set-up-the-custom-vertex-streams-1)
- [Automatic set up the Custom Vertex Streams.](#automatic-set-up-the-custom-vertex-streams)
- [Fix Now](#fix-now)
- [Editor APIs Reference](#editor-apis-reference)
- [Licenses](#licenses)

</details>
Expand Down Expand Up @@ -1403,6 +1404,8 @@ At this time, pressing this button will automatically set the typical vertex str
If you are not familiar with setting up Custom Vertex Streams,<br/>
It is recommended that you use `Fix Now` to correct errors to avoid unwanted errors.

## Editor APIs Reference
- [RenderErrorHandler](Documentation~/RenderErrorHandler.md)
## Licenses
This software is released under the MIT license.
You are free to use it within the scope of the license, but the following copyright and license notices are required.
Expand Down
4 changes: 4 additions & 0 deletions README_JA.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
- [Custom Vertex Streamsを設定する](#custom-vertex-streams%E3%82%92%E8%A8%AD%E5%AE%9A%E3%81%99%E3%82%8B-1)
- [Custom Vertex Streamsを自動的に設定する](#custom-vertex-streams%E3%82%92%E8%87%AA%E5%8B%95%E7%9A%84%E3%81%AB%E8%A8%AD%E5%AE%9A%E3%81%99%E3%82%8B)
- [Fix Now](#fix-now)
- [Editor APIs リファレンス](#editor-apis-%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9)
- [ライセンス](#%E3%83%A9%E3%82%A4%E3%82%BB%E3%83%B3%E3%82%B9)

</details>
Expand Down Expand Up @@ -1413,6 +1414,9 @@ GPUが求めている頂点ストリームとの差異が生じている時に
不要なエラーを避けるために`Fix Now`を利用してエラーを修正することを推奨します。<br/>


## Editor APIs リファレンス
- [RenderErrorHandler](Documentation~/RenderErrorHandler_JA.md)

## ライセンス
本ソフトウェアはMITライセンスで公開しています。
ライセンスの範囲内で自由に使っていただけますが、使用の際は以下の著作権表示とライセンス表示が必須となります。
Expand Down

0 comments on commit b7a9eea

Please sign in to comment.