Skip to content

Commit

Permalink
GameCanvas 5.0.12 に更新
Browse files Browse the repository at this point in the history
- #186 整数が保存できない不具合への暫定対処
- ドキュメント更新
  • Loading branch information
seibe authored Jan 5, 2021
2 parents 52e850b + 44fe407 commit 9b61795
Show file tree
Hide file tree
Showing 13 changed files with 113 additions and 268 deletions.
4 changes: 4 additions & 0 deletions Packages/GameCanvas/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# CHANGE LOG
## 5.0.12
### 不具合修正
- [#186](https://github.com/sfc-sdp/GameCanvas-Unity/issues/186) 整数が保存できない不具合への暫定対処

## 5.0.11
### 機能追加
- 位置情報系APIのサンプルプロジェクトを同梱 (Packages/GameCanvas/Sample~/Geolocation)
Expand Down
12 changes: 0 additions & 12 deletions Packages/GameCanvas/Runtime/Scripts/GcProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Numerics;
using System.Runtime.CompilerServices;
using Unity.Collections;
using Unity.Mathematics;
Expand Down Expand Up @@ -2038,11 +2037,6 @@ public float2 RotateVector(in float2 vector, in float degree)
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public int Round(in double value) => GcMath.Round(value);

/// <inheritdoc/>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Save(in string key, BigInteger? value)
=> m_Context.Storage.Save(key, value.ToString());

/// <inheritdoc/>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Save(in string key, float? value)
Expand Down Expand Up @@ -2459,12 +2453,6 @@ public bool TryGetPointerTraceArray(in GcPointerEventPhase phase, out NativeArra
public bool TryGetScreenKeyboardArea(out GcAABB area)
=> m_Context.InputKey.TryGetScreenKeyboardArea(out area);

/// <inheritdoc/>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public bool TryLoad(in string key, out BigInteger value)
=> m_Context.Storage.TryLoad(key, out string text)
&& BigInteger.TryParse(text, out value);

/// <inheritdoc/>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public bool TryLoad(in string key, out float value)
Expand Down
18 changes: 0 additions & 18 deletions Packages/GameCanvas/Runtime/Scripts/Interface/IStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,6 @@ public interface IStorage

public interface IStorageEx : IStorage
{
/// <summary>
/// ローカルストレージに値を保存します
/// </summary>
/// <remarks>
/// <paramref name="value"/> に null を渡した場合、キーに紐づくデータを削除します
/// </remarks>
/// <param name="key">キー</param>
/// <param name="value">保存する値</param>
void Save(in string key, BigInteger? value);

/// <summary>
/// ローカルストレージに保存された値を取り出します
/// </summary>
/// <param name="key">キー</param>
/// <param name="value">取り出した値</param>
/// <returns>取り出せたかどうか</returns>
bool TryLoad(in string key, out BigInteger value);

[System.Obsolete("Use to `SaveScreenshotAsync` instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
void WriteScreenImage(in string file);
Expand Down
2 changes: 1 addition & 1 deletion Packages/GameCanvas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jp.ac.keio.sfc.sdp",
"version": "5.0.11",
"version": "5.0.12",
"displayName": "GameCanvas",
"description": "GameCanvas for Unity",
"unity": "2020.1",
Expand Down
3 changes: 3 additions & 0 deletions docs/api/GameCanvas.GcCameraDevice.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ <h5 class="fieldValue">Field Value</h5>
</tr>
</tbody>
</table>
<h5 id="GameCanvas_GcCameraDevice_Resolutions_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>iOS, Android の実機以外では常に無効(配列長が0)です</p>
</div>
<h3 id="methods">Methods
</h3>
<a id="GameCanvas_GcCameraDevice_ToString_" data-uid="GameCanvas.GcCameraDevice.ToString*"></a>
Expand Down
123 changes: 37 additions & 86 deletions docs/api/GameCanvas.GcProxy.html
Original file line number Diff line number Diff line change
Expand Up @@ -4726,6 +4726,39 @@ <h5 class="parameters">Parameters</h5>
<td><a class="xref" href="https://docs.microsoft.com/ja-jp/dotnet/api/system.single?view=netstandard-2.0">Single</a></td>
<td><span class="parametername">degree</span></td>
<td><p>回転(度数法)</p>
</td>
</tr>
</tbody>
</table>
<a id="GameCanvas_GcProxy_DrawTexture_" data-uid="GameCanvas.GcProxy.DrawTexture*"></a>
<h4 id="GameCanvas_GcProxy_DrawTexture_UnityEngine_Texture__Unity_Mathematics_float2x3__" data-uid="GameCanvas.GcProxy.DrawTexture(UnityEngine.Texture@,Unity.Mathematics.float2x3@)">DrawTexture(Texture, float2x3)</h4>
<div class="markdown level1 summary"><p>テクスチャーを変形して描画します</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void DrawTexture(in Texture texture, in float2x3 matrix)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.unity3d.com/ja/2019.4/ScriptReference/Texture.html">Texture</a></td>
<td><span class="parametername">texture</span></td>
<td><p>描画するテクスチャー</p>
</td>
</tr>
<tr>
<td><a class="xref" href="https://docs.unity3d.com/Packages/[email protected]/api/Unity.Mathematics.float2x3.html">float2x3</a></td>
<td><span class="parametername">matrix</span></td>
<td><p>アフィン変換行列</p>
</td>
</tr>
</tbody>
Expand Down Expand Up @@ -5675,7 +5708,10 @@ <h5 class="returns">Returns</h5>
</tbody>
</table>
<h5 id="GameCanvas_GcProxy_GetPrimaryCameraResolution_GameCanvas_GcCameraDevice___remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>推奨解像度を取得できない場合、現在のキャンバス解像度とフレームレートに基づいた適当な値を返します</p>
<div class="markdown level1 remarks"><ul>
<li>推奨解像度を取得できない場合、現在のキャンバス解像度とフレームレートに基づいた適当な値を返します</li>
<li>エディタでは常に推奨解像度を取得できません</li>
</ul>
</div>
<a id="GameCanvas_GcProxy_GetSoundLevel_" data-uid="GameCanvas.GcProxy.GetSoundLevel*"></a>
<h4 id="GameCanvas_GcProxy_GetSoundLevel_GameCanvas_GcSoundTrack_" data-uid="GameCanvas.GcProxy.GetSoundLevel(GameCanvas.GcSoundTrack)">GetSoundLevel(GcSoundTrack)</h4>
Expand Down Expand Up @@ -8758,42 +8794,6 @@ <h5 class="parameters">Parameters</h5>
</table>
<h5 id="GameCanvas_GcProxy_Save_System_String__System_Nullable_System_Int32___remarks">Remarks</h5>
<div class="markdown level1 remarks"><p><code data-dev-comment-type="paramref" class="paramref">value</code> に null を渡した場合、キーに紐づくデータを削除します</p>
</div>
<a id="GameCanvas_GcProxy_Save_" data-uid="GameCanvas.GcProxy.Save*"></a>
<h4 id="GameCanvas_GcProxy_Save_System_String__System_Nullable_System_Numerics_BigInteger__" data-uid="GameCanvas.GcProxy.Save(System.String@,System.Nullable{System.Numerics.BigInteger})">Save(String, Nullable&lt;BigInteger&gt;)</h4>
<div class="markdown level1 summary"><p>ローカルストレージに値を保存します</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Save(in string key, BigInteger? value)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/ja-jp/dotnet/api/system.string?view=netstandard-2.0">String</a></td>
<td><span class="parametername">key</span></td>
<td><p>キー</p>
</td>
</tr>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/ja-jp/dotnet/api/system.nullable-1?view=netstandard-2.0">Nullable</a>&lt;<a class="xref" href="https://docs.microsoft.com/ja-jp/dotnet/api/system.numerics.biginteger?view=netstandard-2.0">BigInteger</a>&gt;</td>
<td><span class="parametername">value</span></td>
<td><p>保存する値</p>
</td>
</tr>
</tbody>
</table>
<h5 id="GameCanvas_GcProxy_Save_System_String__System_Nullable_System_Numerics_BigInteger___remarks">Remarks</h5>
<div class="markdown level1 remarks"><p><code data-dev-comment-type="paramref" class="paramref">value</code> に null を渡した場合、キーに紐づくデータを削除します</p>
</div>
<a id="GameCanvas_GcProxy_Save_" data-uid="GameCanvas.GcProxy.Save*"></a>
<h4 id="GameCanvas_GcProxy_Save_System_String__System_Nullable_System_Single__" data-uid="GameCanvas.GcProxy.Save(System.String@,System.Nullable{System.Single})">Save(String, Nullable&lt;Single&gt;)</h4>
Expand Down Expand Up @@ -11881,55 +11881,6 @@ <h5 class="returns">Returns</h5>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/ja-jp/dotnet/api/system.boolean?view=netstandard-2.0">Boolean</a></td>
<td><p>取り出せたかどうか</p>
</td>
</tr>
</tbody>
</table>
<a id="GameCanvas_GcProxy_TryLoad_" data-uid="GameCanvas.GcProxy.TryLoad*"></a>
<h4 id="GameCanvas_GcProxy_TryLoad_System_String__System_Numerics_BigInteger__" data-uid="GameCanvas.GcProxy.TryLoad(System.String@,System.Numerics.BigInteger@)">TryLoad(String, out BigInteger)</h4>
<div class="markdown level1 summary"><p>ローカルストレージに保存された値を取り出します</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public bool TryLoad(in string key, out BigInteger value)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/ja-jp/dotnet/api/system.string?view=netstandard-2.0">String</a></td>
<td><span class="parametername">key</span></td>
<td><p>キー</p>
</td>
</tr>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/ja-jp/dotnet/api/system.numerics.biginteger?view=netstandard-2.0">BigInteger</a></td>
<td><span class="parametername">value</span></td>
<td><p>取り出した値</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/ja-jp/dotnet/api/system.boolean?view=netstandard-2.0">Boolean</a></td>
<td><p>取り出せたかどうか</p>
</td>
</tr>
</tbody>
Expand Down
9 changes: 3 additions & 6 deletions docs/api/GameCanvas.IGameCanvas.html
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,9 @@ <h5>Inherited Members</h5>
<div>
<a class="xref" href="GameCanvas.IGraphics.html#GameCanvas_IGraphics_DrawTexture_UnityEngine_Texture__GameCanvas_GcRect__">IGraphics.DrawTexture(Texture, GcRect)</a>
</div>
<div>
<a class="xref" href="GameCanvas.IGraphics.html#GameCanvas_IGraphics_DrawTexture_UnityEngine_Texture__Unity_Mathematics_float2x3__">IGraphics.DrawTexture(Texture, float2x3)</a>
</div>
<div>
<a class="xref" href="GameCanvas.IGraphics.html#GameCanvas_IGraphics_FillCircle">IGraphics.FillCircle()</a>
</div>
Expand Down Expand Up @@ -578,12 +581,6 @@ <h5>Inherited Members</h5>
<div>
<a class="xref" href="GameCanvas.IPhysics.html#GameCanvas_IPhysics_SweepTest_GameCanvas_GcAABB__GameCanvas_GcAABB__Unity_Mathematics_float2__GameCanvas_GcSweepResult__">IPhysics.SweepTest(GcAABB, GcAABB, float2, GcSweepResult)</a>
</div>
<div>
<a class="xref" href="GameCanvas.IStorageEx.html#GameCanvas_IStorageEx_Save_System_String__System_Nullable_System_Numerics_BigInteger__">IStorageEx.Save(String, Nullable&lt;BigInteger&gt;)</a>
</div>
<div>
<a class="xref" href="GameCanvas.IStorageEx.html#GameCanvas_IStorageEx_TryLoad_System_String__System_Numerics_BigInteger__">IStorageEx.TryLoad(String, BigInteger)</a>
</div>
<div>
<a class="xref" href="GameCanvas.IStorage.html#GameCanvas_IStorage_EraseSavedDataAll">IStorage.EraseSavedDataAll()</a>
</div>
Expand Down
33 changes: 33 additions & 0 deletions docs/api/GameCanvas.IGraphics.html
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,39 @@ <h5 class="parameters">Parameters</h5>
<td><a class="xref" href="https://docs.microsoft.com/ja-jp/dotnet/api/system.single?view=netstandard-2.0">Single</a></td>
<td><span class="parametername">degree</span></td>
<td><p>回転(度数法)</p>
</td>
</tr>
</tbody>
</table>
<a id="GameCanvas_IGraphics_DrawTexture_" data-uid="GameCanvas.IGraphics.DrawTexture*"></a>
<h4 id="GameCanvas_IGraphics_DrawTexture_UnityEngine_Texture__Unity_Mathematics_float2x3__" data-uid="GameCanvas.IGraphics.DrawTexture(UnityEngine.Texture@,Unity.Mathematics.float2x3@)">DrawTexture(Texture, float2x3)</h4>
<div class="markdown level1 summary"><p>テクスチャーを変形して描画します</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void DrawTexture(in Texture texture, in float2x3 matrix)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.unity3d.com/ja/2019.4/ScriptReference/Texture.html">Texture</a></td>
<td><span class="parametername">texture</span></td>
<td><p>描画するテクスチャー</p>
</td>
</tr>
<tr>
<td><a class="xref" href="https://docs.unity3d.com/Packages/[email protected]/api/Unity.Mathematics.float2x3.html">float2x3</a></td>
<td><span class="parametername">matrix</span></td>
<td><p>アフィン変換行列</p>
</td>
</tr>
</tbody>
Expand Down
3 changes: 3 additions & 0 deletions docs/api/GameCanvas.IGraphicsEx.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ <h5>Inherited Members</h5>
<div>
<a class="xref" href="GameCanvas.IGraphics.html#GameCanvas_IGraphics_DrawTexture_UnityEngine_Texture__GameCanvas_GcRect__">IGraphics.DrawTexture(Texture, GcRect)</a>
</div>
<div>
<a class="xref" href="GameCanvas.IGraphics.html#GameCanvas_IGraphics_DrawTexture_UnityEngine_Texture__Unity_Mathematics_float2x3__">IGraphics.DrawTexture(Texture, float2x3)</a>
</div>
<div>
<a class="xref" href="GameCanvas.IGraphics.html#GameCanvas_IGraphics_FillCircle">IGraphics.FillCircle()</a>
</div>
Expand Down
5 changes: 4 additions & 1 deletion docs/api/GameCanvas.IInputCameraEx.html
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,10 @@ <h5 class="returns">Returns</h5>
</tbody>
</table>
<h5 id="GameCanvas_IInputCameraEx_GetPrimaryCameraResolution_GameCanvas_GcCameraDevice___remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>推奨解像度を取得できない場合、現在のキャンバス解像度とフレームレートに基づいた適当な値を返します</p>
<div class="markdown level1 remarks"><ul>
<li>推奨解像度を取得できない場合、現在のキャンバス解像度とフレームレートに基づいた適当な値を返します</li>
<li>エディタでは常に推奨解像度を取得できません</li>
</ul>
</div>
<a id="GameCanvas_IInputCameraEx_PlayCameraImage_" data-uid="GameCanvas.IInputCameraEx.PlayCameraImage*"></a>
<h4 id="GameCanvas_IInputCameraEx_PlayCameraImage_GameCanvas_GcCameraDevice__" data-uid="GameCanvas.IInputCameraEx.PlayCameraImage(GameCanvas.GcCameraDevice@)">PlayCameraImage(GcCameraDevice)</h4>
Expand Down
Loading

0 comments on commit 9b61795

Please sign in to comment.