Skip to content

tsubaki/SerializedParameter_Unity

Repository files navigation

PersistentAmongPlayMode_Unity

エディタ上でゲーム実行時に変更したフィールド変数を保持します。

pre game

playing game
起動後に値を変更

exit game
プレイ終了後も値を保持

#使い方

publicの変数に[PersistentAmongPlayMode]を付ける。
構造体・クラス・プリミティブな値どれでも可…だと思う。

using UnityEngine;

public class SampleComponent : MonoBehaviour
{
	[PersistentAmongPlayMode]
	public string msg = string.Empty;

	public int count = 0;

	[PersistentAmongPlayMode]
	public int serializeCount = 0;
}

-- This software is released under the MIT License, see LICENSE.txt.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages