0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

JokerScriptの表示名を途中で変更する方法

Last updated at Posted at 2016-11-09
  • jnameを変更する方法が見つからず、試行錯誤してしまったため備忘録
  • プラグインを作成して公開しようを参考に、以下のスクリプトを作成すればOK
  • [chara_set name="指定したname" jname="" jcolor=""]で変更可能(jcolorの指定は必須ではない)
PluginComponent.cs
using UnityEngine;
using System.Collections;
using System.Collections.Generic;

namespace Novel{

	public class Chara_setComponent:AbstractComponent
	{
		public Chara_setComponent ()
		{
			this.arrayVitalParam = new List<string>{
			"name","jname"
			};
		}

		public override void start()
		{
			StatusManager.variable.set ("_chara_jname." + this.param ["name"], this.param ["jname"]);
		
			if (this.param.ContainsKey ("jcolor")) {
				StatusManager.variable.set("_chara_jcolor."+this.param["name"] ,this.param["jcolor"]);
			}

			this.gameManager.nextOrder ();
		}
	}

}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?