クラス GcProxy
Namespace: GameCanvas
public sealed class GcProxy : IGameCanvasユーザー定義クラスからGameCanvasの機能を呼び出すためのクラス
継承元
プロパティ
AccelerationEventCount
public int AccelerationEventCount { get; }前回のフレーム処理以降に検出した 加速度イベントの数
AccelerationEvents
public System.ReadOnlySpan<GcAccelerationEvent> AccelerationEvents { get; }前回のフレーム処理以降に検出した 加速度イベントの列挙子
AccelerometerSamplingRate
public float AccelerometerSamplingRate { get; set; }加速度計の動作周波数
BackgroundColor
public Color BackgroundColor { get; set; }背景色
BorderColor
public Color BorderColor { get; }キャンバス外に表示される帯の色
備考
ChangeBorderColor を呼び出すことで変更できます
CameraDeviceCount
public int CameraDeviceCount { get; }認識可能なカメラ(外部入力映像)の数
CameraDevices
public System.ReadOnlySpan<GcCameraDevice> CameraDevices { get; }全ての認識可能なカメラ(外部入力映像)の一覧
CanvasAABB
public GcAABB CanvasAABB { get; }キャンバスのAABB
CanvasCenter
public float2 CanvasCenter { get; }キャンバスの中心座標
CanvasHeight
public int CanvasHeight { get; }キャンバスの縦幅
CanvasResolution
public GcResolution CanvasResolution { get; }キャンバスの解像度とリフレッシュレート
CanvasSize
public int2 CanvasSize { get; }キャンバス解像度
備考
ChangeCanvasSize を呼び出すことで変更できます
CanvasWidth
public int CanvasWidth { get; }キャンバスの横幅
CircleResolution
public int CircleResolution { get; set; }円の解像度
Color
public Color Color { get; set; }描画色
ColorAqua
public Color ColorAqua { get; }水色
ColorBlack
public Color ColorBlack { get; }黒色
ColorBlue
public Color ColorBlue { get; }青色
ColorCyan
public Color ColorCyan { get; }シアン
ColorGray
public Color ColorGray { get; }灰色
ColorGreen
public Color ColorGreen { get; }緑色
ColorPurple
public Color ColorPurple { get; }紫色
ColorRed
public Color ColorRed { get; }赤色
ColorWhite
public Color ColorWhite { get; }白色
ColorYellow
public Color ColorYellow { get; }黄色
CoordinateScope
public CoordinateScope CoordinateScope { get; }PushCoordinate と PopCoordinate が自動的に呼び出されるスコープ
CornerRadius
public float CornerRadius { get; set; }角丸の半径
CurrentCoordinate
public float2x3 CurrentCoordinate { get; set; }現在の座標系(変換行列)
CurrentFrame
public int CurrentFrame { get; }アプリ起動からの累計フレーム数
CurrentStyle
public GcStyle CurrentStyle { get; set; }現在のスタイル
CurrentTime
public System.DateTimeOffset CurrentTime { get; }現在フレームの日時
CurrentTimeDay
public int CurrentTimeDay { get; }現在フレームの日付(1~31)
CurrentTimeDayOfWeek
public System.DayOfWeek CurrentTimeDayOfWeek { get; }現在フレームの曜日(0~6)
CurrentTimeHour
public int CurrentTimeHour { get; }現在フレームの時刻の時間部分(0~23)
CurrentTimeMillisecond
public int CurrentTimeMillisecond { get; }現在フレームの時刻のミリ秒部分(0~999)
CurrentTimeMinute
public int CurrentTimeMinute { get; }現在フレームの時刻の分部分(0~59)
CurrentTimeMonth
public int CurrentTimeMonth { get; }現在フレームの日付の月部分(1~12)
CurrentTimeSecond
public int CurrentTimeSecond { get; }現在フレームの時刻の秒部分(0~59)
CurrentTimestamp
public long CurrentTimestamp { get; }現在フレームのUnixタイムスタンプ
CurrentTimeYear
public int CurrentTimeYear { get; }現在フレームの日付の西暦部分
DeviceScreenHeight
public int DeviceScreenHeight { get; }端末スクリーンの縦幅
DeviceScreenSize
public int2 DeviceScreenSize { get; }端末スクリーン解像度
DeviceScreenWidth
public int DeviceScreenWidth { get; }端末スクリーンの横幅
DidUpdateAccelerationThisFrame
public bool DidUpdateAccelerationThisFrame { get; }前回のフレーム処理以降に 加速度イベントの更新があったかどうか
DidUpdateGeolocationThisFrame
public bool DidUpdateGeolocationThisFrame { get; }前回のフレーム処理以降に 位置情報イベントの更新があったかどうか
Font
public GcFont Font { get; set; }フォント種別
FontSize
public int FontSize { get; set; }フォントサイズ
GeolocationStatus
継承元: IInputGeolocation
LocationServiceStatus GeolocationStatus { get; }位置情報サービスの状態
HasUserAuthorizedPermissionCamera
public bool HasUserAuthorizedPermissionCamera { get; }カメラデバイスへのアクセス権限を取得済みかどうか
HasUserAuthorizedPermissionGeolocation
public bool HasUserAuthorizedPermissionGeolocation { get; }位置情報へのアクセス権限を取得済みかどうか
IsAccelerometerEnabled
public bool IsAccelerometerEnabled { get; set; }加速度計が現在有効かどうか
IsAccelerometerSupported
public bool IsAccelerometerSupported { get; }端末が加速度計を搭載しているかどうか
IsAnyKey
public bool IsAnyKey { get; }なんらかのキーイベントがあるかどうか
IsAnyKeyDown
public bool IsAnyKeyDown { get; }いずれかのキーが押されたかどうか
IsAnyKeyHold
public bool IsAnyKeyHold { get; }いずれかのキーが押されているかどうか(押された瞬間を除く)
IsAnyKeyPress
public bool IsAnyKeyPress { get; }いずれかのキーが押されているかどうか(押された瞬間を含む)
IsAnyKeyUp
public bool IsAnyKeyUp { get; }いずれかのキーが離されたかどうか
IsGeolocationRunning
public bool IsGeolocationRunning { get; }位置情報サービスが起動しているかどうか(起動中を含む)
IsScreenKeyboardSupported
public bool IsScreenKeyboardSupported { get; }スクリーンキーボードがサポートされているかどうか
IsScreenKeyboardVisible
public bool IsScreenKeyboardVisible { get; }スクリーンキーボードが表示されているかどうか
IsTouchPressureSupported
public bool IsTouchPressureSupported { get; }実行端末でタッチ圧力がサポートされているかどうか
IsTouchSupported
public bool IsTouchSupported { get; }実行端末でタッチ操作がサポートされているかどうか
備考
Windowsエディタ環境では、タッチ対応デバイスであっても常に偽を返します
KeyDownCount
public int KeyDownCount { get; }前回のフレーム処理以降に 押されたキーの数
KeyEscape
public Key KeyEscape { get; }戻るボタン(Androidのみ)
KeyHoldCount
public int KeyHoldCount { get; }前回のフレームに引き続き 押されているキーの数(押された瞬間を除く)
KeyPressCount
public int KeyPressCount { get; }前回のフレームに引き続き 押されているキーの数(押された瞬間を含む)
KeyUpCount
public int KeyUpCount { get; }前回のフレーム処理以降に 離されたキーの数
LastAccelerationEvent
public GcAccelerationEvent LastAccelerationEvent { get; }最後に検出した加速度イベント
LastGeolocationEvent
public GcGeolocationEvent LastGeolocationEvent { get; }最後に取得した位置情報イベント
LastPointerEvent
public GcPointerEvent LastPointerEvent { get; }最後に検出したポインターイベント。過去のフレームも含める
LastPointerFrame
public int LastPointerFrame { get; }最後に検出したポインターイベントの 検出フレーム番号
LastPointerPoint
public float2 LastPointerPoint { get; }最後に検出したポインターイベントの位置
LastPointerTime
public float LastPointerTime { get; }最後に検出したポインターイベントの 検出時間(起動からの経過秒数)
LastPointerX
public float LastPointerX { get; }最後に検出したポインターイベントの X座標
LastPointerY
public float LastPointerY { get; }最後に検出したポインターイベントの Y座標
LineCap
public GcLineCap LineCap { get; set; }描線の端点の形状
LineWidth
public float LineWidth { get; set; }描線の太さ
NowTime
public System.DateTimeOffset NowTime { get; }現在(関数呼び出し時点)の日時
PointerBeginCount
public int PointerBeginCount { get; }前回のフレーム処理以降に検出した ポインター開始イベントの数
PointerCount
public int PointerCount { get; }前回のフレーム処理以降に検出した ポインターイベントの数
PointerEndCount
public int PointerEndCount { get; }前回のフレーム処理以降に検出した ポインター終了イベントの数
PointerTapCount
public int PointerTapCount { get; }前回のフレーム処理以降に検出した タップポイントの数
RectAnchor
public GcAnchor RectAnchor { get; set; }矩形のアンカー位置
StringAnchor
public GcAnchor StringAnchor { get; set; }文字列のアンカー位置
StyleScope
public StyleScope StyleScope { get; }PushStyle と PopStyle が自動的に呼び出されるスコープ
TapSettings
public GcTapSettings TapSettings { get; set; }タップ感度の設定
TargetFrameInterval
public double TargetFrameInterval { get; }フレーム更新間隔の目標値(秒)
TargetFrameRate
public int TargetFrameRate { get; }フレームレート(1秒あたりのフレーム数)の目標値
TimeSincePrevFrame
public float TimeSincePrevFrame { get; }ひとつ前のフレームからの経過時間(秒)
TimeSinceStartup
public float TimeSinceStartup { get; }現在フレームのアプリ起動からの経過時間(秒)
VSyncEnabled
public bool VSyncEnabled { get; }垂直同期の有無
備考
この設定は、SetFrameInterval や SetFrameRate の第二引数から変更できます。
メソッド
Abs(float)
public float Abs(in float value)絶対値を計算します
パラメーター
value— 入力値
戻り値
絶対値
Abs(int)
public int Abs(in int value)絶対値を計算します
パラメーター
value— 入力値
戻り値
絶対値
AddActor(GcActor)
public void AddActor(in GcActor actor)指定したアクターをシーンに登録します
パラメーター
actor— 登録するアクター
AlmostSame(float, float)
public bool AlmostSame(in float a, in float b)計算誤差を考慮して同値かどうか判定します
戻り値
同値かどうか
AlmostZero(float)
public bool AlmostZero(in float value)計算誤差を考慮してゼロかどうか判定します
パラメーター
value— 入力値
戻り値
ゼロかどうか
Atan2(float, float)
public float Atan2(in float x, in float y)ベクトルとX+軸平面のなす角度を計算します
パラメーター
x— ベクトルのX軸の大きさy— ベクトルのY軸の大きさ
戻り値
角度(度数法)
Atan2(float2)
public float Atan2(in float2 v)ベクトルとX+軸平面のなす角度を計算します
パラメーター
v— ベクトル
戻り値
角度(度数法)
CalcStringHeight(string)
public float CalcStringHeight(in string str)文字列の縦幅を計算します
パラメーター
str— 文字列
戻り値
縦幅
CalcStringSize(string)
public float2 CalcStringSize(in string str)文字列のサイズを計算します
パラメーター
str— 文字列
戻り値
サイズ
CalcStringWidth(string)
public float CalcStringWidth(in string str)文字列の横幅を計算します
パラメーター
str— 文字列
戻り値
横幅
CanvasToScreenPoint(float2, float2)
public void CanvasToScreenPoint(in float2 canvas, out float2 screen)キャンバス座標を端末スクリーン座標に変換します
パラメーター
canvas— 変換元 キャンバス座標screen— 変換後 端末スクリーン座標
CanvasToScreenPoint(float2, int2)
public void CanvasToScreenPoint(in float2 canvas, out int2 screen)キャンバス座標を端末スクリーン座標に変換します
パラメーター
canvas— 変換元 キャンバス座標screen— 変換後 端末スクリーン座標
ChangeBorderColor(Color)
public void ChangeBorderColor(in Color color)キャンバス外の帯の色を変更します
備考
既存キャンバスの描画内容は全て破棄されます
パラメーター
color— 新しい帯の色
ChangeBorderColor(float, float, float)
public void ChangeBorderColor(in float r, in float g, in float b)帯の色を変更します
パラメーター
r— 帯の色の赤成分g— 帯の色の緑成分b— 帯の色の青成分
ChangeCanvasSize(int, int)
public void ChangeCanvasSize(in int width, in int height)キャンバス解像度を指定します
備考
- 初期値は 720x1280 です
- ディスプレイ解像度と縦横比が異なる場合は、上下もしくは左右に帯がつきます
パラメーター
width— 横幅height— 縦幅
ChangeCanvasSize(int2)
public void ChangeCanvasSize(in int2 size)キャンバス解像度を変更します
備考
- 初期値は 720x1280 です
- ディスプレイ解像度と縦横比が異なる場合は、上下もしくは左右に帯がつきます
- 既存キャンバスの描画内容は全て破棄されます
パラメーター
size— 新しいキャンバス解像度
ChangeScene<T>(object?)
public void ChangeScene<T>(object? state = null) where T : GcSceneシーンを切り替えます
備考
- これまで有効だったシーンは、現在のフレームの最後に終了処理が実行されます
- これから有効になるシーンは、次のフレームの最初に開始処理が実行されます
型パラメーター
T— 開始するシーンの型
パラメーター
state— シーンの開始処理 (IScene.EnterScene) に引数として渡す任意の値
Clamp(float, float, float)
public float Clamp(in float value, in float min, in float max)値を丸めます
パラメーター
value— 入力値min— 最小値max— 最大値
ClearCoordinate()
public void ClearCoordinate()CurrentCoordinate をリセットします
ClearDownloadCache(string)
public void ClearDownloadCache(in string url)指定されたオンラインリソースのダウンロードキャッシュを削除します
パラメーター
url— リソースURL
ClearDownloadCacheAll()
public void ClearDownloadCacheAll()全てのオンラインリソースのダウンロードキャッシュを削除します
ClearScreen()
public void ClearScreen()ClearSound()
public void ClearSound()すべてのサウンド再生を停止し、トラック音量を初期値に戻します
ClearStyle()
public void ClearStyle()CurrentStyle をリセットします
Cos(float)
public float Cos(in float degree)コサインを計算します
パラメーター
degree— 角度(度数法)
戻り値
コサイン
CreateActor<T>()
public T CreateActor<T>() where T : GcActor, new()指定したアクターを生成し、シーンに登録します
型パラメーター
T— 生成・登録するアクターの型
戻り値
登録したアクター
Cross(float2, float2)
public float Cross(in float2 a, in float2 b)ベクトルの外積を計算します
戻り値
外積
CrossTest(GcLine, GcLine, float2)
public bool CrossTest(in GcLine a, in GcLine b, out float2 intersection)CrossTest(GcLine, GcLine)
public bool CrossTest(in GcLine a, in GcLine b)DidUpdateCameraImageThisFrame(GcCameraDevice)
public bool DidUpdateCameraImageThisFrame(in GcCameraDevice camera)前回のフレーム処理以降に 指定されたカメラ(外部入力映像)テクスチャーに更新があったかどうか
パラメーター
camera— カメラ(外部入力映像)
戻り値
テクスチャーに更新があったかどうか
Dot(float2, float2)
public float Dot(in float2 a, in float2 b)ベクトルの内積を計算します
戻り値
内積
DrawCameraImage(GcCameraDevice, bool)
public void DrawCameraImage(in GcCameraDevice camera, bool autoPlay = true)カメラ(外部入力映像)を描画します
パラメーター
camera— カメラ(外部入力映像)autoPlay— カメラ(外部入力映像)が停止していた場合、内部でPlayCameraImageを呼び出すかどうか
DrawCameraImage(GcCameraDevice, float, float, float, bool)
public void DrawCameraImage(in GcCameraDevice camera, in float x, in float y, float degree = 0, bool autoPlay = true)カメラ(外部入力映像)を描画します
パラメーター
camera— カメラ(外部入力映像)x— X座標y— Y座標degree— 回転(度数法)autoPlay— カメラ(外部入力映像)が停止していた場合、内部でPlayCameraImageを呼び出すかどうか
DrawCameraImage(GcCameraDevice, float, float, float, float, float, bool)
public void DrawCameraImage(in GcCameraDevice camera, in float x, in float y, in float width, in float height, float degree = 0f, bool autoPlay = true)カメラ(外部入力映像)を拡縮して描画します
パラメーター
camera— カメラ(外部入力映像)x— X座標y— Y座標width— 横幅。映像の横幅がこれになるように拡縮されるheight— 縦幅。映像の縦幅がこれになるように拡縮されるdegree— 回転(度数法)autoPlay— カメラ(外部入力映像)が停止していた場合、内部でPlayCameraImageを呼び出すかどうか
DrawCameraImage(GcCameraDevice, float2, float, bool)
public void DrawCameraImage(in GcCameraDevice camera, in float2 position, float degree = 0, bool autoPlay = true)カメラ(外部入力映像)を描画します
パラメーター
camera— カメラ(外部入力映像)position— 位置degree— 回転(度数法)autoPlay— カメラ(外部入力映像)が停止していた場合、内部でPlayCameraImageを呼び出すかどうか
DrawCameraImage(GcCameraDevice, GcRect, bool)
public void DrawCameraImage(in GcCameraDevice camera, in GcRect rect, bool autoPlay = true)カメラ(外部入力映像)を拡縮して描画します
パラメーター
camera— カメラ(外部入力映像)rect— 映像をフィッティングする矩形領域autoPlay— カメラ(外部入力映像)が停止していた場合、内部でPlayCameraImageを呼び出すかどうか
DrawCircle()
public void DrawCircle()中抜きの円を描画します
DrawCircle(float, float, float)
public void DrawCircle(in float x, in float y, in float radius)円を線で描画します
パラメーター
x— 中心のX座標y— 中心のY座標radius— 半径
DrawCircle(float2, float)
public void DrawCircle(in float2 position, in float radius)円を線で描画します
パラメーター
position— 中心の座標radius— 半径
DrawCircle(GcCircle)
public void DrawCircle(in GcCircle circle)中抜きの円を描画します
パラメーター
circle— 円
DrawImage(GcImage, float, float, float, float, float)
public void DrawImage(in GcImage image, in float x, in float y, in float width, in float height, float degree = 0f)画像を拡縮して描画します
パラメーター
image— 描画する画像x— X座標y— Y座標width— 横幅。画像の横幅がこれになるように拡縮されるheight— 縦幅。画像の縦幅がこれになるように拡縮されるdegree— 回転(度数法)
DrawImage(GcImage, float, float, float)
public void DrawImage(in GcImage image, in float x, in float y, float degree = 0f)画像を描画します
パラメーター
image— 描画する画像x— X座標y— Y座標degree— 回転(度数法)
DrawImage(GcImage, float2, float)
public void DrawImage(in GcImage image, in float2 position, float degree = 0f)画像を描画します
パラメーター
image— 描画する画像position— 位置degree— 回転(度数法)
DrawImage(GcImage, GcRect)
public void DrawImage(in GcImage image, in GcRect rect)画像を拡縮して描画します
パラメーター
image— 描画する画像rect— 画像をフィッティングする矩形領域
DrawImage(GcImage)
public void DrawImage(in GcImage image)画像を描画します
パラメーター
image— 描画する画像
DrawLine()
public void DrawLine()線を描画します
DrawLine(float, float, float, float)
public void DrawLine(in float x0, in float y0, in float x1, in float y1)線を描画します
パラメーター
x0— 始点のX座標y0— 始点のY座標x1— 終点のX座標y1— 終点のY座標
DrawLine(float2, float2)
public void DrawLine(in float2 begin, in float2 end)線を描画します
パラメーター
begin— 始点end— 終点
DrawLine(GcLine)
public void DrawLine(in GcLine line)線を描画します
パラメーター
line— 線
DrawOnlineImage(string, float, float, float, float, float)
public GcAvailability DrawOnlineImage(in string url, in float x, in float y, in float width, in float height, float degree = 0f)オンライン画像リソースを拡縮して描画します
パラメーター
url— リソースURLx— X座標y— Y座標width— 横幅。画像の横幅がこれになるように拡縮されるheight— 縦幅。画像の縦幅がこれになるように拡縮されるdegree— 回転(度数法)
DrawOnlineImage(string, float, float, float)
public GcAvailability DrawOnlineImage(in string url, in float x, in float y, float degree = 0f)オンライン画像リソースを描画します
パラメーター
url— リソースURLx— X座標y— Y座標degree— 回転(度数法)
戻り値
オンラインリソースの可用性
DrawOnlineImage(string, float2, float)
public GcAvailability DrawOnlineImage(in string url, in float2 position, float degree = 0f)オンライン画像リソースを描画します
パラメーター
url— リソースURLposition— 位置degree— 回転(度数法)
戻り値
オンラインリソースの可用性
DrawOnlineImage(string, GcRect)
public GcAvailability DrawOnlineImage(in string url, in GcRect rect)オンライン画像リソースを拡縮して描画します
パラメーター
url— リソースURLrect— 画像をフィッティングする矩形領域
DrawOnlineImage(string)
public GcAvailability DrawOnlineImage(in string url)オンライン画像リソースを描画します
パラメーター
url— リソースURL
戻り値
オンラインリソースの可用性
DrawRect()
public void DrawRect()矩形を線で描画します
DrawRect(float, float, float, float, float)
public void DrawRect(in float x, in float y, in float width, in float height, float degree = 0f)矩形を線で描画します
パラメーター
x— X座標y— Y座標width— 横幅height— 縦幅degree— 回転(度数法)
DrawRect(float2, float2, float)
public void DrawRect(in float2 position, in float2 size, float degree = 0f)矩形を線で描画します
パラメーター
position— 位置size— 大きさdegree— 回転(度数法)
DrawRect(GcRect)
public void DrawRect(in GcRect rect)矩形を線で描画します
パラメーター
rect— 矩形
DrawRoundedRect()
public void DrawRoundedRect()角丸矩形を線で描画します
DrawRoundedRect(float, float, float, float, float, float)
public void DrawRoundedRect(in float x, in float y, in float width, in float height, float cornerRadius, float degree = 0f)角丸矩形を線で描画します
パラメーター
x— X座標y— Y座標width— 横幅height— 縦幅cornerRadius— 角丸の半径degree— 回転(度数法)
DrawRoundedRect(float, float, float, float, float)
public void DrawRoundedRect(in float x, in float y, in float width, in float height, float degree = 0f)角丸矩形を線で描画します
パラメーター
x— X座標y— Y座標width— 横幅height— 縦幅degree— 回転(度数法)
DrawRoundedRect(float2, float2, float, float)
public void DrawRoundedRect(in float2 position, in float2 size, float cornerRadius, float degree = 0f)角丸矩形を線で描画します
パラメーター
position— 位置size— 大きさcornerRadius— 角丸の半径degree— 回転(度数法)
DrawRoundedRect(float2, float2, float)
public void DrawRoundedRect(in float2 position, in float2 size, float degree = 0f)角丸矩形を線で描画します
パラメーター
position— 位置size— 大きさdegree— 回転(度数法)
DrawRoundedRect(GcRect, float)
public void DrawRoundedRect(in GcRect rect, float cornerRect)角丸矩形を線で描画します
パラメーター
rect— 二等辺三角形が収まる矩形cornerRadius— 角丸の半径
DrawRoundedRect(GcRect)
public void DrawRoundedRect(in GcRect rect)角丸矩形を線で描画します
パラメーター
rect— 二等辺三角形が収まる矩形
DrawString(string, float, float, float, float, float)
public void DrawString(in string str, in float x, in float y, in float width, in float height, float degree = 0f)文字列を拡縮して描画します
パラメーター
str— 描画する文字列x— X座標y— Y座標width— 横幅。文字列の横幅がこれになるように拡縮されるheight— 縦幅。文字列の縦幅がこれになるように拡縮されるdegree— 回転(度数法)
DrawString(string, float, float, float)
public void DrawString(in string str, in float x, in float y, float degree = 0f)文字列を描画します
パラメーター
str— 描画する文字列x— X座標y— Y座標degree— 回転(度数法)
DrawString(string, float2, float)
public void DrawString(in string str, in float2 position, float degree = 0f)文字列を描画します
パラメーター
str— 描画する文字列position— 位置degree— 回転(度数法)
DrawString(string, GcRect)
public void DrawString(in string str, in GcRect rect)文字列を拡縮して描画します
パラメーター
str— 描画する文字列rect— 文字列をフィッティングする矩形領域
DrawString(string)
public void DrawString(in string str)文字列を描画します
パラメーター
str— 描画する文字列
DrawTexture(Texture, float, float, float, float, float)
public void DrawTexture(in Texture texture, in float x, in float y, in float width, in float height, float degree = 0f)テクスチャーを拡縮して描画します
パラメーター
texture— 描画するテクスチャーx— X座標y— Y座標width— 横幅。画像の横幅がこれになるように拡縮されるheight— 縦幅。画像の縦幅がこれになるように拡縮されるdegree— 回転(度数法)
DrawTexture(Texture, float2, float)
public void DrawTexture(in Texture texture, in float2 position, float degree = 0f)テクスチャーを描画します
パラメーター
texture— 描画するテクスチャーposition— 位置degree— 回転(度数法)
DrawTexture(Texture, float2x3)
public void DrawTexture(in Texture texture, in float2x3 matrix)テクスチャーを変形して描画します
パラメーター
texture— 描画するテクスチャーmatrix— アフィン変換行列
DrawTexture(Texture, GcRect)
public void DrawTexture(in Texture texture, in GcRect rect)テクスチャーを拡縮して描画します
パラメーター
texture— 描画するテクスチャーrect— テクスチャーをフィッティングする矩形領域
DrawTexture(Texture)
public void DrawTexture(in Texture texture)テクスチャーを描画します
パラメーター
texture— 描画するテクスチャー
EraseSavedDataAll()
public void EraseSavedDataAll()ローカルストレージに保存された全ての値を削除します
FillCircle()
public void FillCircle()円を塗りで描画します
FillCircle(float, float, float)
public void FillCircle(in float x, in float y, in float radius)円を塗りで描画します
パラメーター
x— 中心のX座標y— 中心のY座標radius— 半径
FillCircle(float2, float)
public void FillCircle(in float2 position, in float radius)円を塗りで描画します
パラメーター
position— 中心の座標radius— 半径
FillCircle(GcCircle)
public void FillCircle(in GcCircle circle)円を塗りで描画します
パラメーター
circle— 円
FillRect()
public void FillRect()矩形を塗りで描画します
FillRect(float, float, float, float, float)
public void FillRect(in float x, in float y, in float width, in float height, float degree = 0f)矩形を塗りで描画します
パラメーター
x— X座標y— Y座標width— 横幅height— 縦幅degree— 回転(度数法)
FillRect(float2, float2, float)
public void FillRect(in float2 position, in float2 size, float degree = 0f)矩形を塗りで描画します
パラメーター
position— 位置size— 大きさdegree— 回転(度数法)
FillRect(GcRect)
public void FillRect(in GcRect rect)矩形を塗りで描画します
パラメーター
rect— 矩形
FillRoundedRect()
public void FillRoundedRect()角丸矩形を塗りで描画します
FillRoundedRect(float, float, float, float, float, float)
public void FillRoundedRect(in float x, in float y, in float width, in float height, float cornerRadius, float degree = 0f)角丸矩形を塗りで描画します
パラメーター
x— X座標y— Y座標width— 横幅height— 縦幅cornerRadius— 角丸の半径degree— 回転(度数法)
FillRoundedRect(float, float, float, float, float)
public void FillRoundedRect(in float x, in float y, in float width, in float height, float degree = 0f)角丸矩形を塗りで描画します
パラメーター
x— X座標y— Y座標width— 横幅height— 縦幅degree— 回転(度数法)
FillRoundedRect(float2, float2, float, float)
public void FillRoundedRect(in float2 position, in float2 size, float cornerRadius, float degree = 0f)角丸矩形を塗りで描画します
パラメーター
position— 位置size— 大きさcornerRadius— 角丸の半径degree— 回転(度数法)
FillRoundedRect(float2, float2, float)
public void FillRoundedRect(in float2 position, in float2 size, float degree = 0f)角丸矩形を塗りで描画します
パラメーター
position— 位置size— 大きさdegree— 回転(度数法)
FillRoundedRect(GcRect, float)
public void FillRoundedRect(in GcRect rect, float cornerRadius)角丸矩形を塗りで描画します
パラメーター
rect— 二等辺三角形が収まる矩形cornerRadius— 角丸の半径
FillRoundedRect(GcRect)
public void FillRoundedRect(in GcRect rect)角丸矩形を塗りで描画します
パラメーター
rect— 二等辺三角形が収まる矩形
FocusCameraImage(GcCameraDevice, float2?)
public void FocusCameraImage(in GcCameraDevice camera, in float2? uv)カメラ(外部入力映像)の任意の点に焦点をあわせるように要求します
備考
- このAPIは、対応するカメラデバイスに対して、実機上での実行したときのみ動作します
uv引数は、キャンバス座標系ではなく、左下を原点とする 0.0~1.0 のUV座標系を指定します- 焦点あわせを解除するには、
uv引数に null を渡します
パラメーター
camera— カメラ(外部入力映像)uv— 焦点をあわせる位置(左下を原点とする 0.0~1.0 のUV座標系)
GetActor()
public GcActor? GetActor()シーンに登録されているアクターのうち、1つだけ取得します
戻り値
取得できたアクター
GetActor<T>()
public T? GetActor<T>() where T : GcActorシーンに登録されているアクターのうち、指定した型のものを1つだけ取得します
型パラメーター
T— 取得するアクターの型
戻り値
取得できたアクター
GetActorCount()
public int GetActorCount()シーンに登録されているアクターの総数を取得します
戻り値
アクターの数
GetActorCount<T>()
public int GetActorCount<T>() where T : GcActorシーンに登録されているアクターのうち、指定した型のものが幾つあるか取得します
型パラメーター
T— 取得するアクターの型
戻り値
アクターの数
GetActorList<T>()
継承元: ISceneManagementEx
ReadOnlyActorList<T> GetActorList<T>() where T : GcActorシーンに登録されているアクターのうち、指定した型のものを取得します
型パラメーター
T— 取得するアクターの型
戻り値
取得したアクターのリスト
GetImageHeight(GcImage)
public int GetImageHeight(in GcImage image)画像の縦幅を取得します
パラメーター
image— 画像
戻り値
縦幅
GetImageSize(GcImage)
public int2 GetImageSize(in GcImage image)画像のサイズを取得します
パラメーター
image— 画像
戻り値
サイズ
GetImageWidth(GcImage)
public int GetImageWidth(in GcImage image)画像の横幅を取得します
パラメーター
image— 画像
戻り値
横幅
GetKeyPressDuration(Key)
public float GetKeyPressDuration(in Key key)指定されたキーが押されている時間(秒)
パラメーター
key— キー
戻り値
時間(秒)
GetKeyPressFrameCount(Key)
public int GetKeyPressFrameCount(in Key key)指定されたキーが押されているフレーム数
パラメーター
key— キー
戻り値
フレーム数
GetOnlineImageHeight(string)
public int GetOnlineImageHeight(in string url)オンライン画像リソースの縦幅を取得します
パラメーター
url— リソースURL
戻り値
オンライン画像リソースの縦幅。取得できなかった場合は0を返します
GetOnlineImageWidth(string)
public int GetOnlineImageWidth(in string url)オンライン画像リソースの横幅を取得します
パラメーター
url— リソースURL
戻り値
オンライン画像リソースの横幅。取得できなかった場合は0を返します
GetOrCreateCameraTexture(GcCameraDevice, GcResolution)
public WebCamTexture? GetOrCreateCameraTexture(in GcCameraDevice camera, in GcResolution request)指定されたカメラ(外部入力映像)のテクスチャーを生成もしくは取得します
備考
- 既にテクスチャーが生成済みの場合は、
request引数の値は無視されます - 生成後に解像度を変更する場合は
TryChangeCameraImageResolution関数を呼び出してください
パラメーター
camera— カメラ(外部入力映像)request— テクスチャーが未生成だった場合に、希望する解像度とリフレッシュレート
戻り値
テクスチャー
GetPrimaryCameraResolution(GcCameraDevice)
public GcResolution GetPrimaryCameraResolution(in GcCameraDevice camera)指定されたカメラ(外部入力映像)の推奨解像度を取得します
備考
- 推奨解像度を取得できない場合、現在のキャンバス解像度とフレームレートに基づいた適当な値を返します
- エディタでは常に推奨解像度を取得できません
パラメーター
camera— カメラ(外部入力映像)
戻り値
解像度とリフレッシュレート
GetRandomState()
public uint GetRandomState()乱数計算の現在の状態(≒シード値)を取得します
戻り値
シード値
GetSoundLevel(GcSoundTrack)
public float GetSoundLevel(GcSoundTrack track = GcSoundTrack.Master)トラック音量を取得します
パラメーター
track— 対象の音声トラック
戻り値
音量(-96db~20db)
GetSoundVolume(GcSoundTrack)
public float GetSoundVolume(GcSoundTrack track = GcSoundTrack.Master)トラック音量を取得します
パラメーター
track— 対象の音声トラック
戻り値
音量(0f~1f)
HideScreenKeyboard()
public void HideScreenKeyboard()スクリーンキーボードを閉じます
HitTest(GcAABB, float2)
public bool HitTest(in GcAABB aabb, in float2 point)GcAABB と 点の接触判定
HitTest(GcAABB, GcAABB)
public bool HitTest(in GcAABB a, in GcAABB b)HitTest(GcCircle, float2)
public bool HitTest(in GcCircle circle, in float2 point)GcCircle と 点の接触判定
HitTest(GcCircle, GcCircle)
public bool HitTest(in GcCircle circle1, in GcCircle circle2)IsFlippedCameraImage(GcCameraDevice)
public bool IsFlippedCameraImage(in GcCameraDevice camera)指定されたカメラ(外部入力映像)は上下が反転しているかどうか
パラメーター
camera— カメラ(外部入力映像)
戻り値
上下が反転しているかどうか
IsKeyDown(Key)
public bool IsKeyDown(in Key key)指定されたキーが押されたかどうか
パラメーター
key— キー
戻り値
押されたかどうか
IsKeyHold(Key, GcKeyTrace)
public bool IsKeyHold(in Key key, out GcKeyTrace trace)指定されたキーが押されているかどうか(押された瞬間を除く)
パラメーター
key— キーtrace— キーの軌跡
戻り値
押されているかどうか(押された瞬間を除く)
IsKeyHold(Key)
public bool IsKeyHold(in Key key)指定されたキーが押されているかどうか(押された瞬間を除く)
パラメーター
key— キー
戻り値
押されているかどうか(押された瞬間を除く)
IsKeyPress(Key)
public bool IsKeyPress(in Key key)指定されたキーが押されているかどうか(押された瞬間を含む)
パラメーター
key— キー
戻り値
押されているかどうか(押された瞬間を含む)
IsKeyUp(Key, GcKeyTrace)
public bool IsKeyUp(in Key key, out GcKeyTrace trace)指定されたキーが離されたかどうか
パラメーター
key— キーtrace— キーの軌跡
戻り値
離されたかどうか
IsKeyUp(Key)
public bool IsKeyUp(in Key key)指定されたキーが離されたかどうか
パラメーター
key— キー
戻り値
離されたかどうか
IsPlayingCameraImage(GcCameraDevice)
public bool IsPlayingCameraImage(in GcCameraDevice camera)指定されたカメラ(外部入力映像)の更新が行われているかどうか
パラメーター
camera— カメラ(外部入力映像)
戻り値
更新が行われているかどうか
IsPlayingSound(GcSoundTrack)
public bool IsPlayingSound(GcSoundTrack track = GcSoundTrack.BGM1)指定された音声トラックが再生中かどうか
パラメーター
track— 対象の音声トラック
戻り値
再生中かどうか
IsTapped()
public bool IsTapped()前回のフレーム処理以降に タップされたかどうか
戻り値
タップされたかどうか
IsTapped(float, float, float, float, float, float)
public bool IsTapped(in float x, in float y, in float width, in float height, out float px, out float py)前回のフレーム処理以降に 指定した領域がタップされたかどうか
パラメーター
x— 領域 左上X座標y— 領域 左上Y座標width— 領域 横幅height— 領域 縦幅px— タップ位置 X座標py— タップ位置 Y座標
戻り値
指定した領域がタップされたかどうか
IsTapped(float, float)
public bool IsTapped(out float x, out float y)前回のフレーム処理以降に タップされたかどうか
パラメーター
x— タップ位置 X座標y— タップ位置 Y座標
戻り値
タップされたかどうか
IsTapped(float2)
public bool IsTapped(out float2 point)前回のフレーム処理以降に タップされたかどうか
パラメーター
point— タップ位置
戻り値
タップされたかどうか
IsTapped(GcAABB, float2)
public bool IsTapped(in GcAABB aabb, out float2 point)前回のフレーム処理以降に 指定した領域がタップされたかどうか
パラメーター
aabb— 領域point— タップ位置
戻り値
指定した領域がタップされたかどうか
IsTouchBegan()
public bool IsTouchBegan()前回のフレーム処理以降に タッチされ始めたかどうか
戻り値
タッチされ始めたかどうか
IsTouchBegan(float, float, float, float, float, float)
public bool IsTouchBegan(in float x, in float y, in float width, in float height, out float px, out float py)前回のフレーム処理以降に 指定した領域がタッチされ始めたかどうか
パラメーター
x— 領域 左上X座標y— 領域 左上Y座標width— 領域 横幅height— 領域 縦幅px— タッチ位置 X座標py— タッチ位置 Y座標
戻り値
指定した領域がタッチされ始めたかどうか
IsTouchBegan(float, float)
public bool IsTouchBegan(out float x, out float y)前回のフレーム処理以降に タッチされ始めたかどうか
パラメーター
x— タッチ位置 X座標y— タッチ位置 Y座標
戻り値
タッチされ始めたかどうか
IsTouchBegan(float2)
public bool IsTouchBegan(out float2 point)前回のフレーム処理以降に タッチされ始めたかどうか
パラメーター
point— タッチ位置
戻り値
タッチされ始めたかどうか
IsTouchBegan(GcAABB, float2)
public bool IsTouchBegan(in GcAABB aabb, out float2 point)前回のフレーム処理以降に 指定した領域がタッチされ始めたかどうか
パラメーター
aabb— 領域point— タッチ位置
戻り値
指定した領域がタッチされ始めたかどうか
IsTouchBegan(GcPointerEvent)
public bool IsTouchBegan(out GcPointerEvent pointer)前回のフレーム処理以降に タッチされ始めたかどうか
パラメーター
pointer— ポインターイベント
戻り値
タッチされ始めたかどうか
IsTouched()
public bool IsTouched()前回のフレーム処理以降 タッチされていたか(開始と終了を含む)
戻り値
タッチされていたか(開始と終了を含む)
IsTouched(float, float, float, float, float, float)
public bool IsTouched(in float x, in float y, in float width, in float height, out float px, out float py)前回のフレーム処理以降 指定した領域がタッチされていたか(開始と終了を含む)
パラメーター
x— 領域 左上X座標y— 領域 左上Y座標width— 領域 横幅height— 領域 縦幅px— タッチ位置 X座標py— タッチ位置 Y座標
戻り値
指定した領域がタッチされていたか(開始と終了を含む)
IsTouched(float, float)
public bool IsTouched(out float x, out float y)前回のフレーム処理以降 タッチされていたか(開始と終了を含む)
パラメーター
x— タッチ位置 X座標y— タッチ位置 Y座標
戻り値
タッチされていたか(開始と終了を含む)
IsTouched(float2)
public bool IsTouched(out float2 point)前回のフレーム処理以降 タッチされていたか(開始と終了を含む)
パラメーター
point— タッチ位置
戻り値
タッチされていたか(開始と終了を含む)
IsTouched(GcAABB, float2)
public bool IsTouched(in GcAABB aabb, out float2 point)前回のフレーム処理以降 指定した領域がタッチされていたか(開始と終了を含む)
パラメーター
aabb— 領域point— タッチ位置
戻り値
指定した領域がタッチされていたか(開始と終了を含む)
IsTouched(GcPointerEvent)
public bool IsTouched(out GcPointerEvent pointer)前回のフレーム処理以降 タッチされていたか(開始と終了を含む)
パラメーター
e— ポインターイベント
戻り値
タッチされていたか(開始と終了を含む)
IsTouched(GcPointerTrace)
public bool IsTouched(out GcPointerTrace pointer)前回のフレーム処理以降 タッチされていたか(開始と終了を含む)
パラメーター
trace— タッチの軌跡
戻り値
タッチされていたか(開始と終了を含む)
IsTouchEnded()
public bool IsTouchEnded()前回のフレーム処理以降 タッチされ終えたかどうか
戻り値
タッチされ終えたかどうか
IsTouchEnded(float, float, float, float, float, float)
public bool IsTouchEnded(in float x, in float y, in float width, in float height, out float px, out float py)前回のフレーム処理以降 指定した領域がタッチされ終えたかどうか
パラメーター
x— 領域 左上X座標y— 領域 左上Y座標width— 領域 横幅height— 領域 縦幅px— タッチ位置 X座標py— タッチ位置 Y座標
戻り値
指定した領域がタッチされ終えたかどうか
IsTouchEnded(float, float)
public bool IsTouchEnded(out float x, out float y)前回のフレーム処理以降 タッチされ終えたかどうか
パラメーター
x— タッチ位置 X座標y— タッチ位置 Y座標
戻り値
タッチされ終えたかどうか
IsTouchEnded(float2)
public bool IsTouchEnded(out float2 point)前回のフレーム処理以降 タッチされ終えたかどうか
パラメーター
point— タッチ位置
戻り値
タッチされ終えたかどうか
IsTouchEnded(GcAABB, float2)
public bool IsTouchEnded(in GcAABB aabb, out float2 point)前回のフレーム処理以降 指定した領域がタッチされ終えたかどうか
パラメーター
aabb— 領域point— タッチ位置
戻り値
指定した領域がタッチされ終えたかどうか
IsTouchEnded(GcPointerEvent)
public bool IsTouchEnded(out GcPointerEvent pointer)前回のフレーム処理以降 タッチされ終えたかどうか
パラメーター
pointer— ポインターイベント
戻り値
タッチされ終えたかどうか
IsTouchEnded(GcPointerTrace)
public bool IsTouchEnded(out GcPointerTrace pointer)前回のフレーム処理以降 タッチされ終えたかどうか
パラメーター
pointer— タッチの軌跡
戻り値
タッチされ終えたかどうか
Max(float, float)
public float Max(in float a, in float b)2つの値を比較して、より大きい方を返します
戻り値
大きい方の値
Min(float, float)
public float Min(in float a, in float b)2つの値を比較して、より小さい方を返します
戻り値
小さい方の値
PauseCameraImage(GcCameraDevice)
public bool PauseCameraImage(in GcCameraDevice camera)指定されたカメラ(外部入力映像)の更新処理を一時停止します
パラメーター
camera— カメラ(外部入力映像)
戻り値
停止したかどうか(元から停止していた場合を含まない)
PauseSound(GcSoundTrack)
public void PauseSound(GcSoundTrack track = GcSoundTrack.BGM1)指定された音声トラックのサウンドを一時停止します
備考
BGMトラック以外では常に無視されます
パラメーター
track— 対象の音声トラック
PlayCameraImage(GcCameraDevice, GcResolution, int2)
public bool PlayCameraImage(in GcCameraDevice camera, in GcResolution request, out int2 resolution)指定されたカメラ(外部入力映像)の更新処理を開始します
備考
- カメラごとにこのAPIを呼び出すことで、それらを同時に更新することが可能です
- ただし、同じ名称のカメラは、同時に更新することができません
- 既にテクスチャーが生成済みの場合は、
request引数の値は無視されます - 生成後に解像度を変更する場合は
TryChangeCameraImageResolution関数を呼び出してください
パラメーター
camera— カメラ(外部入力映像)request— テクスチャーが未生成だった場合に、希望する解像度とリフレッシュレートresolution— カメラ(外部入力映像)の解像度
戻り値
開始したかどうか(元から更新していた場合を含まない)
PlayCameraImage(GcCameraDevice, int2)
public bool PlayCameraImage(in GcCameraDevice camera, out int2 resolution)指定されたカメラ(外部入力映像)の更新処理を開始します
備考
- カメラごとにこのAPIを呼び出すことで、それらを同時に更新することが可能です
- ただし、同じ名称のカメラは、同時に更新することができません
- テクスチャーが未生成だった場合は、内部で勝手に適当な解像度で生成します
パラメーター
camera— カメラ(外部入力映像)resolution— カメラ(外部入力映像)の解像度
戻り値
開始したかどうか(元から更新していた場合を含まない)
PlayCameraImage(GcCameraDevice)
public bool PlayCameraImage(in GcCameraDevice camera)指定されたカメラ(外部入力映像)の更新処理を開始します
備考
- カメラごとにこのAPIを呼び出すことで、それらを同時に更新することが可能です
- ただし、同じ名称のカメラは、同時に更新することができません
パラメーター
camera— カメラ(外部入力映像)
戻り値
開始したかどうか(元から更新していた場合を含まない)
PlaySE(AudioClip)
public void PlaySE(in AudioClip clip)サウンドを1回再生します
パラメーター
clip— サウンド
PlaySE(GcSound)
public void PlaySE(in GcSound sound)サウンドを1回再生します
パラメーター
sound— サウンド
PlaySound(AudioClip, GcSoundTrack, bool)
public void PlaySound(in AudioClip clip, GcSoundTrack track = GcSoundTrack.BGM1, bool loop = false)サウンドを再生します
パラメーター
clip— サウンドtrack— 対象の音声トラックloop— ループ再生するかどうか(SEトラック以外)
PlaySound(GcSound, GcSoundTrack, bool)
public void PlaySound(in GcSound sound, GcSoundTrack track = GcSoundTrack.BGM1, bool loop = false)サウンドを再生します
パラメーター
soundId— サウンドtrack— 対象の音声トラックloop— ループ再生するかどうか(SEトラック以外)
PopCoordinate()
public void PopCoordinate()スタックから座標系(変換行列)を取り出し CurrentCoordinate に上書きします
PopStyle()
public void PopStyle()スタックから描画スタイルを取り出し CurrentStyle に上書きします
PushCoordinate()
public void PushCoordinate()CurrentCoordinate をスタックに保存します
PushStyle()
public void PushStyle()CurrentStyle をスタックに保存します
Random()
public float Random()0以上1未満のランダムな値を算出します
戻り値
ランダムな値
Random(float, float)
public float Random(in float min, in float max)min以上max未満のランダムな値を算出します
パラメーター
min— 最小値max— 最大値
戻り値
ランダムな値
Random(int, int)
public int Random(in int min, in int max)min以上max以下のランダムな値を算出します
パラメーター
min— 最小値max— 最大値
戻り値
ランダムな値
RebuildFontTexture()
public void RebuildFontTexture()フォントテクスチャ―を再生成します
備考
- テキスト描画が乱れた場合にのみ呼び出すことを想定しています
- 実際に再生成が行われるのは、この関数を呼び出した次のフレームの冒頭です
RegisterScene(GcScene)
public void RegisterScene(in GcScene scene)新たなシーンを登録します
備考
登録したシーンは ChangeScene を呼び出すことで有効になります
パラメーター
scene— 登録するシーン
RegisterScene<T>()
public void RegisterScene<T>() where T : GcScene, new()新たなシーンを登録します
備考
登録したシーンは ChangeScene を呼び出すことで有効になります
型パラメーター
T— 登録するシーンの型
RemoveActorAll()
public void RemoveActorAll()シーンに登録されているすべてのアクターを登録解除します
Repeat(float, float)
public float Repeat(in float value, in float max)値を 0 から max までの範囲を繰り返すよう値を丸めます
パラメーター
value— 入力値max— 最大値
RequestUserAuthorizedPermissionCameraAsync(System.Action<bool>)
public void RequestUserAuthorizedPermissionCameraAsync(in System.Action<bool> callback)カメラデバイスへのアクセス権限を要求します
パラメーター
callback— 結果を通知するコールバック
RequestUserAuthorizedPermissionGeolocationAsync(System.Action<bool>)
public void RequestUserAuthorizedPermissionGeolocationAsync(in System.Action<bool> callback)位置情報へのアクセス権限を要求します
パラメーター
callback— 結果を通知するコールバック
RotateCoordinate(float, float, float)
public void RotateCoordinate(in float degree, in float originX, in float originY)座標系(変換行列)を回転させます
パラメーター
degree— 回転量(度数法)originX— 回転中心のX座標originY— 回転中心のY座標
RotateCoordinate(float, float2)
public void RotateCoordinate(in float degree, in float2 origin)座標系(変換行列)を指定した座標を中心に回転させます
パラメーター
degree— 回転量(度数法)origin— 回転中心
RotateCoordinate(float)
public void RotateCoordinate(in float degree)座標系(変換行列)を回転させます
パラメーター
degree— 回転量(度数法)
RotateVector(float2, float)
public float2 RotateVector(in float2 vector, in float degree)ベクトルを回転します
パラメーター
vector— ベクトルdegree— 回転量(度数法)
戻り値
回転後のベクトル
Round(double)
public int Round(in double value)値を四捨五入します
パラメーター
value— 入力値
戻り値
四捨五入された値
Round(float)
public int Round(in float value)値を四捨五入します
パラメーター
value— 入力値
戻り値
四捨五入された値
Save(string, float?)
public void Save(in string key, float? value)ローカルストレージに値を保存します
備考
value に null を渡した場合、キーに紐づくデータを削除します
パラメーター
key— キーvalue— 保存する値
Save(string, int?)
public void Save(in string key, int? value)ローカルストレージに値を保存します
備考
value に null を渡した場合、キーに紐づくデータを削除します
パラメーター
key— キーvalue— 保存する値
Save(string, string?)
public void Save(in string key, string? value)ローカルストレージに値を保存します
備考
value に null を渡した場合、キーに紐づくデータを削除します
パラメーター
key— キーvalue— 保存する値
SaveScreenshotAsync(System.Action<string?>?)
public void SaveScreenshotAsync(System.Action<string?>? onComplete = null)現在の画面を 画像として保存します
備考
- 保存に成功した場合、
onCompleteの引数には、画像保存先のパスが渡されます - 保存に失敗した場合、
onCompleteの引数には null が渡されます
パラメーター
onComplete— 保存完了後に呼び出されるコールバック
ScaleCoordinate(float, float)
public void ScaleCoordinate(in float sx, in float sy)座標系(変換行列)を拡縮させます
パラメーター
sx— X軸方向の拡縮率sy— Y軸方向の拡縮率
ScaleCoordinate(float2)
public void ScaleCoordinate(in float2 scaling)座標系(変換行列)を拡縮させます
パラメーター
scaling— 拡縮率
ScreenToCanvasPoint(float2, float2)
public void ScreenToCanvasPoint(in float2 screen, out float2 canvas)端末スクリーン座標をキャンバス座標に変換します
パラメーター
screen— 変換元 端末スクリーン座標canvas— 変換後 キャンバス座標
ScreenToCanvasPoint(float2, int2)
public void ScreenToCanvasPoint(in float2 screen, out int2 canvas)端末スクリーン座標をキャンバス座標に変換します
パラメーター
screen— 変換元 端末スクリーン座標canvas— 変換後 キャンバス座標
SetBackgroundColor(Color)
public void SetBackgroundColor(in Color color)背景色を指定します
パラメーター
color— 背景色
SetBackgroundColor(float, float, float)
public void SetBackgroundColor(in float r, in float g, in float b)背景色を指定します
パラメーター
r— 背景色の赤成分g— 背景色の緑成分b— 背景色の青成分
SetColor(byte, byte, byte, byte)
public void SetColor(in byte r, in byte g, in byte b, byte a = 255)描画色を指定します
パラメーター
r— 描画色の赤成分g— 描画色の緑成分b— 描画色の青成分a— 描画色の不透明度
SetColor(Color, float)
public void SetColor(in Color color, in float alpha)描画色を指定します
パラメーター
color— 描画色alpha— 描画色の不透明度
SetColor(Color)
public void SetColor(in Color color)描画色を指定します
パラメーター
color— 描画色
SetColor(float, float, float, float)
public void SetColor(in float r, in float g, in float b, float a = 1f)描画色を指定します
パラメーター
r— 描画色の赤成分g— 描画色の緑成分b— 描画色の青成分a— 描画色の不透明度
SetCoordinate(float2x3)
public void SetCoordinate(in float2x3 matrix)座標系(変換行列)を指定します
パラメーター
matrix— 座標系(変換行列)
SetFont(GcFont)
public void SetFont(in GcFont font)フォントを指定します
パラメーター
font— フォント
SetFontSize(int)
public void SetFontSize(in int fontSize)フォントサイズを指定します
パラメーター
fontSize— フォントサイズ
SetFrameInterval(double, bool)
public void SetFrameInterval(in double targetDeltaTime, bool vSyncEnabled = true)UpdateGame や DrawGame が呼び出される時間間隔を設定します。
備考
垂直同期を無効にした場合、間隔の揺らぎは減少しますが、ディスプレイのリフレッシュレートを常に無視して描画するため、画面のちらつきが発生する場合があります。
パラメーター
targetDeltaTime— フレーム更新間隔の目標値(秒)vSyncEnabled— 垂直同期の有無
SetFrameRate(int, bool)
public void SetFrameRate(in int targetFrameRate, bool vSyncEnabled = true)フレームレートの目標値を設定します。
小数点以下を指定したい場合は、この関数の代わりに SetFrameInterval を使用してください。
備考
垂直同期を無効にした場合、間隔の揺らぎは減少しますが、ディスプレイのリフレッシュレートを常に無視して描画するため、画面のちらつきが発生する場合があります。
パラメーター
targetFrameRate— フレームレート(1秒あたりのフレーム数)の目標値vSyncEnabled— 垂直同期の有無
SetLineCap(GcLineCap)
public void SetLineCap(in GcLineCap lineCap)描線の端点の形状を指定します
パラメーター
lineCap— 描線の端点の形状
SetLineWidth(float)
public void SetLineWidth(in float lineWidth)描線の太さを指定します
パラメーター
lineWidth— 描線の太さ
SetRandomSeed(uint)
public void SetRandomSeed(in uint seed)乱数計算のシード値を設定します
パラメーター
seed— シード値
SetRandomSeedByIndex(uint)
public void SetRandomSeedByIndex(in uint index)乱数計算のシード値をインデックスから設定します
パラメーター
index— インデックス
SetRectAnchor(GcAnchor)
public void SetRectAnchor(in GcAnchor anchor)矩形や画像のアンカー位置を指定します
パラメーター
anchor— アンカー位置
SetSoundLevel(float, GcSoundTrack)
public void SetSoundLevel(in float decibel, GcSoundTrack track = GcSoundTrack.Master)トラック音量を変更します
パラメーター
decibel— 音量(-96db~20db)track— 対象の音声トラック
SetSoundVolume(float, GcSoundTrack)
public void SetSoundVolume(in float volume, GcSoundTrack track = GcSoundTrack.Master)トラック音量を変更します
パラメーター
volume— 音量(0f~1f)track— 対象の音声トラック
SetStringAnchor(GcAnchor)
public void SetStringAnchor(in GcAnchor anchor)文字列のアンカー位置を指定します
パラメーター
anchor— アンカー位置
SetStyle(GcStyle)
public void SetStyle(in GcStyle style)スタイルを指定します
パラメーター
style—
ShowScreenKeyboard()
public bool ShowScreenKeyboard()スクリーンキーボードを表示します
戻り値
表示できたかどうか
Sin(float)
public float Sin(in float degree)サインを計算します
パラメーター
degree— 角度(度数法)
戻り値
サイン
Sqrt(float)
public float Sqrt(in float value)平方根を計算します
パラメーター
value— 入力値
戻り値
平方根
StartGeolocationService(float, float)
public void StartGeolocationService(float desiredAccuracy = 10, float updateDistance = 10)位置情報サービスを起動します
備考
位置情報へのアクセス権限がない場合、この処理は失敗します
パラメーター
desiredAccuracy— 望ましいサービス精度(メートル単位)updateDistance— 位置情報の更新に必要な最小移動距離(メートル単位)
StopCameraImage(GcCameraDevice)
public void StopCameraImage(in GcCameraDevice camera)指定されたカメラ(外部入力映像)の更新処理を完全に停止します
パラメーター
camera— カメラ(外部入力映像)
StopGeolocationService()
public void StopGeolocationService()位置情報サービスを停止します
StopSound(GcSoundTrack)
public void StopSound(GcSoundTrack track = GcSoundTrack.BGM1)指定された音声トラックのサウンドを停止します
備考
BGMトラック以外では常に無視されます
パラメーター
track— 対象の音声トラック
SweepTest(GcAABB, float2, float2, GcSweepResult)
public bool SweepTest(in GcAABB @static, in float2 @dynamic, in float2 delta, out GcSweepResult hit)移動する点と静的な矩形の連続衝突検出
SweepTest(GcAABB, GcAABB, float2, GcSweepResult)
public bool SweepTest(in GcAABB @static, in GcAABB @dynamic, in float2 delta, out GcSweepResult hit)移動する矩形と静的な矩形の連続衝突検出
TranslateCoordinate(float, float)
public void TranslateCoordinate(in float tx, in float ty)座標系(変換行列)を平行移動させます
パラメーター
tx— X軸方向の移動量ty— Y軸方向の移動量
TranslateCoordinate(float2)
public void TranslateCoordinate(in float2 translation)座標系(変換行列)を平行移動させます
パラメーター
translation— 移動量
TryChangeCameraImageResolution(GcCameraDevice, GcResolution)
public int2 TryChangeCameraImageResolution(in GcCameraDevice camera, in GcResolution request)指定されたカメラ(外部入力映像)の解像度変更を試みます
パラメーター
camera— カメラ(外部入力映像)request— 希望する解像度とリフレッシュレート
戻り値
実際に設定された解像度
TryGetAccelerationEvent(int, GcAccelerationEvent)
public bool TryGetAccelerationEvent(int i, out GcAccelerationEvent e)前回のフレーム処理以降に検出した 加速度イベントの取得を試みます
パラメーター
i— イベントインデックス(0 からAccelerationEventCount-1 までの連番)e— イベント
戻り値
ポインターイベントを取得できたかどうか
TryGetAccelerationEventAll(System.ReadOnlySpan<GcAccelerationEvent>)
public bool TryGetAccelerationEventAll(out System.ReadOnlySpan<GcAccelerationEvent> events)前回のフレーム処理以降に検出した 加速度イベントの取得を試みます
パラメーター
events— イベント配列
戻り値
1つ以上の加速度イベントがあったかどうか
TryGetActor(int, GcActor?)
public bool TryGetActor(in int i, [NotNullWhen(true)] out GcActor? actor)シーンに登録されているアクターを 1つだけ取得します
型パラメーター
T— 取得するアクターの型
パラメーター
i— 取得するアクターのインデックス(0以上GetActorCount未満)actor— 取得できたアクター
戻り値
取得できたかどうか
TryGetActor<T>(int, T?)
public bool TryGetActor<T>(in int i, [NotNullWhen(true)] out T? actor) where T : GcActorシーンに登録されているアクターを 1つだけ取得します
型パラメーター
T— 取得するアクターの型
パラメーター
i— 取得するアクターのインデックス(0以上GetActorCount{T}未満)actor— 取得できたアクター
戻り値
取得できたかどうか
TryGetActorAll<T>(System.ReadOnlySpan<T>)
public bool TryGetActorAll<T>(out System.ReadOnlySpan<T> actors) where T : GcActorシーンに登録されているアクターのうち、指定した型のものを取得します
型パラメーター
T— 取得するアクターの型
パラメーター
actors— 取得したアクターの一覧
戻り値
1つ以上 取得できたかどうか
TryGetCameraImage(GcCameraDevice?)
public bool TryGetCameraImage([NotNullWhen(true)] out GcCameraDevice? camera)カメラ(外部入力映像)の取得を試みます
パラメーター
camera— カメラ(外部入力映像)
戻り値
取得できたかどうか
TryGetCameraImage(string, GcCameraDevice?)
public bool TryGetCameraImage(in string deviceName, [NotNullWhen(true)] out GcCameraDevice? camera)デバイス名を指定して、カメラ(外部入力映像)の取得を試みます
パラメーター
deviceName— デバイス名camera— カメラ(外部入力映像)
戻り値
取得できたかどうか
TryGetCameraImageAll(System.ReadOnlySpan<GcCameraDevice>)
public bool TryGetCameraImageAll(out System.ReadOnlySpan<GcCameraDevice> devices)全ての認識可能なカメラ(外部入力映像)の取得を試みます
パラメーター
devices— カメラ(外部入力映像)の一覧
戻り値
1つ以上 取得できたかどうか
TryGetCameraImageRotation(GcCameraDevice, float)
public bool TryGetCameraImageRotation(in GcCameraDevice camera, out float degree)指定されたカメラ(外部入力映像)の回転角度取得を試みます
パラメーター
camera— カメラ(外部入力映像)degree— 回転角度
戻り値
取得できたかどうか
TryGetCameraImageSize(GcCameraDevice, int2)
public bool TryGetCameraImageSize(in GcCameraDevice camera, out int2 resolution)指定されたカメラ(外部入力映像)の解像度取得を試みます
備考
- テクスチャーが未生成の場合は、取得に失敗します
- テクスチャーを生成するには、
PlayCameraImageもしくはGetOrCreateCameraTexture関数を呼び出してください
パラメーター
camera— カメラ(外部入力映像)resolution— カメラ(外部入力映像)の解像度
戻り値
取得できたかどうか
TryGetGeolocationEvent(GcGeolocationEvent)
public bool TryGetGeolocationEvent(out GcGeolocationEvent data)前回のフレーム処理以降にあった 位置情報イベントの取得を試みます
パラメーター
e— 位置情報イベント
戻り値
前回のフレーム処理以降に 位置情報イベントがあったかどうか
TryGetKeyEvent(Key, GcKeyEvent)
public bool TryGetKeyEvent(in Key key, out GcKeyEvent e)指定されたキーのキーイベントがあれば取得します
パラメーター
key— キーe— キーイベント
戻り値
取得できたかどうか
TryGetKeyEventAll(GcKeyEventPhase, System.ReadOnlySpan<GcKeyEvent>)
public bool TryGetKeyEventAll(in GcKeyEventPhase phase, out System.ReadOnlySpan<GcKeyEvent> events)前回のフレーム処理以降に更新された 指定された状態のキーイベント全てを取得します
パラメーター
phase— キーイベント状態events— キーイベントの一覧
戻り値
要素数が1以上かどうか
TryGetKeyEventAll(System.ReadOnlySpan<GcKeyEvent>)
public bool TryGetKeyEventAll(out System.ReadOnlySpan<GcKeyEvent> events)前回のフレーム処理以降に更新された キーイベント全てを取得します
パラメーター
events— キーイベントの一覧
戻り値
要素数が1以上かどうか
TryGetKeyTrace(Key, GcKeyTrace)
public bool TryGetKeyTrace(in Key key, out GcKeyTrace trace)指定されたキーの軌跡があれば取得します
パラメーター
key— キーtrace— キーの軌跡
戻り値
取得できたかどうか
TryGetKeyTraceAll(GcKeyEventPhase, System.ReadOnlySpan<GcKeyTrace>)
public bool TryGetKeyTraceAll(in GcKeyEventPhase phase, out System.ReadOnlySpan<GcKeyTrace> traces)前回のフレーム処理以降に更新された キーの軌跡全てを取得します
パラメーター
phase— キーイベント状態traces— キーの軌跡の一覧
戻り値
要素数が1以上かどうか
TryGetKeyTraceAll(System.ReadOnlySpan<GcKeyTrace>)
public bool TryGetKeyTraceAll(out System.ReadOnlySpan<GcKeyTrace> traces)前回のフレーム処理以降に更新された キーの軌跡全てを取得します
パラメーター
traces— キーの軌跡の一覧
戻り値
要素数が1以上かどうか
TryGetOnlineImage(string, GcAvailability, Texture2D?)
public bool TryGetOnlineImage(in string url, out GcAvailability availability, [NotNullWhen(true)] out Texture2D? texture)オンライン画像リソースの取得を試みます
パラメーター
url— リソースURLtexture— 画像リソース。戻り値がGcAvailability.Ready以外だとNull
戻り値
オンラインリソースの可用性
TryGetOnlineImageSize(string, int2)
public bool TryGetOnlineImageSize(in string url, out int2 size)オンライン画像リソースの寸法を取得します
パラメーター
url— リソースURLsize— オンライン画像リソースの寸法
戻り値
オンラインリソースを取得できたかどうか
TryGetOnlineSound(string, AudioType, GcAvailability, AudioClip?)
public bool TryGetOnlineSound(in string url, in AudioType type, out GcAvailability availability, [NotNullWhen(true)] out AudioClip? clip)オンライン音声リソースの取得を試みます
パラメーター
url— リソースURLtype— 音声リソースの形式clip— 音声リソース。戻り値がGcAvailability.Ready以外だとNull
戻り値
オンラインリソースの可用性
TryGetOnlineSound(string, GcAvailability, AudioClip?)
public bool TryGetOnlineSound(in string url, out GcAvailability availability, [NotNullWhen(true)] out AudioClip? clip)オンライン音声リソースの取得を試みます
パラメーター
url— リソースURLclip— 音声リソース。戻り値がGcAvailability.Ready以外だとNull
戻り値
オンラインリソースの可用性
TryGetOnlineText(string, GcAvailability, string?)
public bool TryGetOnlineText(in string url, out GcAvailability availability, [NotNullWhen(true)] out string? str)オンラインテキストの取得を試みます
パラメーター
url— リソースURLclip— テキスト。戻り値がGcAvailability.Ready以外だとNull
戻り値
オンラインリソースの可用性
TryGetPointerEvent(GcPointerEventPhase, int, GcPointerEvent)
public bool TryGetPointerEvent(in GcPointerEventPhase phase, in int i, out GcPointerEvent e)前回のフレーム処理以降に検出した ポインターイベントのうち、1つを取得します
パラメーター
phase— イベント状態i— イベントインデックス(イベントIDではない)e— イベント
戻り値
取得できたかどうか
TryGetPointerEvent(int, GcPointerEvent)
public bool TryGetPointerEvent(in int i, out GcPointerEvent e)前回のフレーム処理以降に検出した ポインターイベントのうち、1つを取得します
パラメーター
i— イベントインデックス(0 からPointerCount-1 までの連番。イベントIDではない)e— イベント
戻り値
取得できたかどうか
TryGetPointerEventAll(GcPointerEventPhase, System.ReadOnlySpan<GcPointerEvent>)
public bool TryGetPointerEventAll(in GcPointerEventPhase phase, out System.ReadOnlySpan<GcPointerEvent> events)前回のフレーム処理以降に検出した 指定された状態のポインターイベント全てを取得します
パラメーター
phase— イベント状態events— イベントの一覧
戻り値
1つ以上 取得できたかどうか
TryGetPointerEventAll(System.ReadOnlySpan<GcPointerEvent>)
public bool TryGetPointerEventAll(out System.ReadOnlySpan<GcPointerEvent> events)前回のフレーム処理以降に検出した ポインターイベント全てを取得します
パラメーター
events— イベントの一覧
戻り値
1つ以上 取得できたかどうか
TryGetPointerTapPoint(int, float2)
public bool TryGetPointerTapPoint(in int i, out float2 point)前回のフレーム処理以降に検出した タップポイントのうち、1つを取得します
パラメーター
i— タップインデックスpoint— タップポイント
戻り値
取得できたかどうか
TryGetPointerTapPointAll(System.ReadOnlySpan<float2>)
public bool TryGetPointerTapPointAll(out System.ReadOnlySpan<float2> points)前回のフレーム処理以降に検出した タップポイント全てを取得します
パラメーター
points— タップポイントの一覧
戻り値
1つ以上 取得できたかどうか
TryGetPointerTrace(GcPointerEventPhase, int, GcPointerTrace)
public bool TryGetPointerTrace(in GcPointerEventPhase phase, in int i, out GcPointerTrace trace)現在有効なポインターのうち、1つの軌跡を取得します
備考
phase に指定できる値は GcPointerEventPhase.Hold または GcPointerEventPhase.End のみです
パラメーター
phase— イベント状態i— イベントインデックス(イベントIDではない)trace— 軌跡
戻り値
取得できたかどうか
TryGetPointerTrace(int, GcPointerTrace)
public bool TryGetPointerTrace(in int i, out GcPointerTrace history)現在有効なポインターのうち、1つの軌跡を取得します
パラメーター
i— イベントインデックス(0 からPointerCount-1 までの連番。イベントIDではない)trace— 軌跡
戻り値
取得できたかどうか
TryGetPointerTraceAll(GcPointerEventPhase, System.ReadOnlySpan<GcPointerTrace>)
public bool TryGetPointerTraceAll(in GcPointerEventPhase phase, out System.ReadOnlySpan<GcPointerTrace> traces)前回のフレーム処理以降に検出した 指定された状態のポインターの軌跡全てを取得します
備考
phase に指定できる値は GcPointerEventPhase.Hold または GcPointerEventPhase.End のみです
パラメーター
traces— 軌跡の一覧
戻り値
1つ以上 取得できたかどうか
TryGetPointerTraceAll(System.ReadOnlySpan<GcPointerTrace>)
public bool TryGetPointerTraceAll(out System.ReadOnlySpan<GcPointerTrace> traces)前回のフレーム処理以降に検出した ポインターの軌跡全てを取得します
パラメーター
traces— 軌跡の一覧
戻り値
1つ以上 取得できたかどうか
TryGetScreenKeyboardArea(GcAABB)
public bool TryGetScreenKeyboardArea(out GcAABB area)スクリーンキーボードの表示位置を取得します
備考
- 表示中のみ取得できます
- 表示直後のアニメーション中は取得できません
- Android OSでは取得できません
パラメーター
area— 表示位置(キャンバス座標系)
戻り値
取得できたかどうか
TryLoad(string, float)
public bool TryLoad(in string key, out float value)ローカルストレージに保存された値を取り出します
パラメーター
key— キーvalue— 取り出した値
戻り値
取り出せたかどうか
TryLoad(string, int)
public bool TryLoad(in string key, out int value)ローカルストレージに保存された値を取り出します
パラメーター
key— キーvalue— 取り出した値
戻り値
取り出せたかどうか
TryLoad(string, string?)
public bool TryLoad(in string key, [NotNullWhen(true)] out string? value)ローカルストレージに保存された値を取り出します
パラメーター
key— キーvalue— 取り出した値
戻り値
取り出せたかどうか
TryRemoveActor(GcActor)
public bool TryRemoveActor(in GcActor actor)指定したアクターをシーンから登録解除します
パラメーター
actor— 登録解除するアクター
戻り値
登録解除できたかどうか
UnpauseSound(GcSoundTrack)
public void UnpauseSound(GcSoundTrack track = GcSoundTrack.BGM1)指定された音声トラックのサウンドを一時停止していた場合、再生を再開します
備考
BGMトラック以外では常に無視されます
パラメーター
track— 対象の音声トラック
UnregisterScene(GcScene)
public void UnregisterScene(in GcScene scene)指定したシーンをシーン一覧から削除します
備考
もし指定したシーンが現在有効なシーンだった場合、フレームの最後にシーンの離脱処理が走ります
パラメーター
scene— 削除するシーン
UnregisterScene<T>()
public void UnregisterScene<T>() where T : GcScene指定したシーンをシーン一覧から削除します
備考
もし指定したシーンが現在有効なシーンだった場合、フレームの最後にシーンの離脱処理が走ります
型パラメーター
T— 削除するシーンの型
UpdateCameraDevice()
public int UpdateCameraDevice()カメラ(外部入力映像)の一覧を更新します
戻り値
更新後の 認識可能なカメラ(外部入力映像)の数
