Skip to content

Instantly share code, notes, and snippets.

todorok1

Block or report user

Report or block todorok1

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@todorok1
todorok1 / SpotlightController.cs
Created Jun 5, 2019
スポットライトをターゲットに向けるスクリプト
View SpotlightController.cs
/// <Summary>
/// スポットライトをtargetの方向に向ける
/// </Summary>
public class SpotlightController : MonoBehaviour{
public GameObject target;
void Start(){
}
@todorok1
todorok1 / text_shiro.txt
Created May 18, 2019
カスタムフォントとTextコンポーネントでUI上にタイルマップを作る
View text_shiro.txt
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFUVFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFMOFFFFFFFFFFFF
FFFFFFFFFFFFFFFFNPFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
@todorok1
todorok1 / text.txt
Created May 18, 2019
カスタムフォントとTextコンポーネントでUI上にタイルマップを作る
View text.txt
AAAAAAAAAAAAADAAAAAAAAAAAAAAAA
AAAAAAAAAAAAADAAAAAAAAAAAAAAAA
AAAAAAAAAAAAADAAAAAAAAAAAAAAAA
AAAAAAAAAAAAADAAAAAAAAAAAAAAAA
AAAAAAAAAAAAADAAAAAAAAAAAAAAAA
AAAAAAAAAAAAADAAAAAAAAAAAAAAAA
AAAAAAAAAAAAADAAAAAAAAAAAAAAAA
AAAAAAAAAAAAADAAAAAAAAAAAAAAAA
CCCCCCCCCCCCCBCCCCCCCCCCCCCCCC
AAAAAAAAAAAAADAAAAAAAAAAAAAAAA
@todorok1
todorok1 / RefScript_post.cs
Created May 14, 2019
古いAPIの更新を行ったファイル
View RefScript_post.cs
public class RefScript : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
// 新しくなった
GetComponent<Light>().color = Color.red;
}
}
@todorok1
todorok1 / RefScript_pre.cs
Created May 14, 2019
古いAPIのアップデート
View RefScript_pre.cs
public class RefScript : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
// これは古い書き方
light.color = Color.red;
}
}
@todorok1
todorok1 / xml_sample_ireko.xml
Created Feb 8, 2019
入れ子になったXMLのサンプル
View xml_sample_ireko.xml
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Root>
<Data>
<enemyName>スライム</enemyName>
<maxHp>4</maxHp>
<atk>2</atk>
<def>2</def>
<special>
<waza1>ひのこ</waza1>
<waza2>はっぱカッター</waza2>
@todorok1
todorok1 / xml_sample.xml
Created Feb 8, 2019
XMLの構造サンプル
View xml_sample.xml
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Root>
<Data>
<enemyName>スライム</enemyName>
<maxHp>4</maxHp>
<atk>2</atk>
<def>2</def>
<exp>1</exp>
<gold>2</gold>
</Data>
@todorok1
todorok1 / XmlToCsvConverterEditor.cs
Last active Feb 9, 2019
XMLファイルをCSVファイルに変換するEditor拡張
View XmlToCsvConverterEditor.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System.IO;
using System.Xml.Linq;
[CustomEditor(typeof(XmlToCsvConverter))]
public class XmlToCsvConverterEditor : Editor {
@todorok1
todorok1 / XmlToCsvConverter.cs
Created Feb 8, 2019
XMLファイルをCSVファイルに変換するEditor拡張の準備
View XmlToCsvConverter.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu(menuName = "MyScriptable/Create XML to CSV Converter")]
public class XmlToCsvConverter : ScriptableObject {
public TextAsset xmlFile;
public string csvFileName;
}
@todorok1
todorok1 / comparing_csv_to_xml.txt
Created Feb 8, 2019
Editor拡張によるCSVからXMLへの変換結果
View comparing_csv_to_xml.txt
// CSV
enemyName,maxHp,atk,def,exp,gold
スライム,4,2,2,1,2
ゴブリン,8,4,2,2,3
ジャイアントマウス,12,5,3,3,5
// XML
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Root>
<Data>
You can’t perform that action at this time.