基本答え&解説のみ
基本答え&解説のみ
問題1 答え
問題1 解説
http://ufcpp.net/study/csharp/sp_attribute.html引用 : ++C++ // 未確認飛行 C
問題1 解説
問題1 解説
問題1 解説
問題1 解説
問題1 解説
問題1 解説
問題1 解説
問題2 答え
問題2 解説
問題2 解説
問題2 解説
問題2 解説
問題2 解説
問題2 解説
問題2 解説
問題2 解説
問題2 解説
問題2 解説
問題2 解説
問題3 答え
using UnityEditor;
using UnityEngine;
public class Question3 : EditorWindow
{
[MenuItem("Question3/EditorWindow")]
static void Open()
{
GetWindow<Question3>();
}
void OnGUI()
{
if (Event.current.type == EventType.ContextClick)
{
GenericMenu genericMenu = new GenericMenu();
genericMenu.AddItem(new GUIContent("CreateCube"), false, () => GameObject.CreatePrimitive(PrimitiveType.Cube));
genericMenu.ShowAsContext();
}
}
}
問題3 解説
問題3 解説
Rect ( 0, 0, 100 , 10 )
問題3 解説
問題4 解答
using UnityEditor;
[CustomEditor(typeof(Question4))]
public class Question4Inspector : Editor
{
public override void OnInspectorGUI()
{
Question4 question4 = (Question4)target;
question4.username = EditorGUILayout.TextField("名前",
question4.username);
question4.hp = EditorGUILayout.IntSlider("HP", question4.hp, 0, 10);
question4.atk = EditorGUILayout.IntSlider("力", question4.atk, 0, 10);
question4.agi = EditorGUILayout.IntSlider("すばやさ", question4.agi, 0, 10);
}
}
using UnityEngine;
public class Question4 : MonoBehaviour
{
public string username;
public int hp, atk, agi;
}
問題4 解説
問題4 解説
GameObjectInspector
TransformInspector
CameraInspector
問題4 解説
GameObject
Transform
Camera
GameObjectInspector
TransformInspector
CameraInspector
問題4 解説
問題4 解説
MonoScript MonoScriptInspector
問題4 解説
MonoScript MonoScriptInspector
Editor4Inspector
問題4 解説
public override void OnInspectorGUI()
{
}
問題4 解説
問題5 答え
using UnityEngine;
public class Question5 : MonoBehaviour
{
public Vector3[] positions = new Vector3[]
{
new Vector3(0,0,0),
new Vector3(-5,0,0),
new Vector3(0,5,0),
new Vector3(0,0,5),
new Vector3(5,-5,5),
};
void OnDrawGizmos()
{
foreach (var position in positions)
{
Gizmos.DrawWireSphere(position, 0.5f);
}
}
}
using UnityEngine;
public class Question5 : MonoBehaviour
{
public Vector3[] positions = new Vector3[]
{
new Vector3(0,0,0),
new Vector3(-5,0,0),
new Vector3(0,5,0),
new Vector3(0,0,5),
new Vector3(5,-5,5),
};
}
using UnityEditor;
using UnityEngine;
public class Question5Editor
{
[DrawGizmo(GizmoType.Active)]
static void OnDrawGizmo(Question5 question5, GizmoType type)
{
foreach (Vector3 position in question5.positions)
{
Gizmos.DrawWireSphere(position, 0.5f);
}
}
}
問題5 解説
(25分)
ヒント1は10分後
ヒント2は15分後
問題5 解説
(25分)
ヒント1は10分後
ヒント2は15分後
問題5 解説
(25分)
ヒント1は10分後
ヒント2は15分後
GizmoTypeによって描画を切り替える
オブジェクトがどのような状態なのかを細かく監視
問題5 解説
問題6
問題6 答え
https://gist.github.com/anchan828/8ce42635b5ce92c90c23
問題6 解説
問題6 解説
問題7
問題7 答え
https://gist.github.com/anchan828/a1442127953909d2ea23
問題7 解説
ScriptableObjectを作成するのは簡単
ただし管理を厳密に
問題7 解説
UnityEditor上で値が変更されていても
ファイルには保存されていない
データの保存
保存されるタイミングはUnityEditor終了時
問題7 解説
すぐデータをファイルに保存するには、
EditorUtility.SetDirty
&
AssetDatabase.SaveAssets
を使用する
データの保存
問題7 解説
問題8 答え
https://gist.github.com/anchan828/fe92724044cb47315dae
問題8 解説
AssetPostprocessorを継承したクラス
インポートされるアセットは全てココを通る
問題8 解説
サポートされていないアセットのインポート結
果を取得するにはOnPostprocessAllAssetsを
使用する
ShaderやScriptableObjectなど
問題8 解説
問題9答え
https://gist.github.com/anchan828/6665d545062d07b8210b
問題9解説
EditorUtility.OpenFilePanelはファイルの絶対パスを返す
キャンセルされると空文字を返す
キャンセルされるまでファイルを追加する処理
問題9解説
EditorApplication.OpenSceneAdditive
は絶対パスでは動作しないことに注意
問題9 解説
問題10 答え
https://gist.github.com/anchan828/4c18205a5e4a7fa6e316
問題10 解説
Undo.RegisterCreatedObjectUndo
オブジェクトの生成に関するUndo
Undo.RegisterSceneUndo
シーンに関するUndo
Undo.∼Snapshot系
オブジェクト操作に関するUndo
問題10 解説

More Related Content

PDF
基本&ヒント
PDF
ITAP Consumer Insights: Singapore
PDF
Auditor Destacado - Fred Lyons
PPTX
Reward, reproducibility and recognition in research - the case for going Open
PPTX
Workshop marketing digital Melgaço 2017
PPTX
Emerging OER Discipline
PDF
140 år av jämställdhetsarbete i Finland
PDF
Le XXIème siècle, des avancées en dents de scie pour les femmes au travail
基本&ヒント
ITAP Consumer Insights: Singapore
Auditor Destacado - Fred Lyons
Reward, reproducibility and recognition in research - the case for going Open
Workshop marketing digital Melgaço 2017
Emerging OER Discipline
140 år av jämställdhetsarbete i Finland
Le XXIème siècle, des avancées en dents de scie pour les femmes au travail

Viewers also liked (12)

PPTX
From Pillar To Promotion: How To Create Killer Content That Drives Growth
PDF
Growth Hacking Belgium (kick-off)
PPTX
Minimalism: makes life more beautiful
PDF
WindowsでPython
PDF
"La mujer y el arte en el siglo XIX: Algunas pintoras del Romanticismo"
PDF
Open Bades Action Lab
PPT
Mineral water plants consultancy
PDF
Social media influencer marketing a framework for success - michelle goodall
PDF
Forward thinking: What's next for AI
 
PDF
cvpaper.challengeについて
PDF
Proyecciones económicas de Panamá 2017-2019
PDF
Wearables london - Reflections on 3 years as a Wearables analyst - James Hayw...
From Pillar To Promotion: How To Create Killer Content That Drives Growth
Growth Hacking Belgium (kick-off)
Minimalism: makes life more beautiful
WindowsでPython
"La mujer y el arte en el siglo XIX: Algunas pintoras del Romanticismo"
Open Bades Action Lab
Mineral water plants consultancy
Social media influencer marketing a framework for success - michelle goodall
Forward thinking: What's next for AI
 
cvpaper.challengeについて
Proyecciones económicas de Panamá 2017-2019
Wearables london - Reflections on 3 years as a Wearables analyst - James Hayw...
Ad

More from Keigo Ando (18)

PDF
Unity5.3で知識が止まっている人向けのUnity2017.2に合わせたエディター拡張アップデート
PDF
Unity5.3の機能まとめ
PDF
Unibook4執筆ガイドライン
PDF
わたしのVisual studio環境
PDF
Unibook3執筆ガイドライン
PDF
UNIBOOK2執筆ガイドライン
PDF
Unityでアプリを作るには
PDF
Unity2DとNewGUIについて
PDF
応用のみ
PDF
Editor10-提出方法
PDF
Unity Networkとの違い
PDF
CodeTemplateについて / SublimeText → Monodevelopに戻ってきた話
PDF
Editor スクリプティング 入門
PDF
エディタ拡張勉強会第0回
PDF
Unity3.5と4.0の違い
PDF
【第5回】渋谷Unity技術勉強会 - WebPlayer面白いよ!
PDF
Asset server(管理者編)
PDF
Unity games uplaod
Unity5.3で知識が止まっている人向けのUnity2017.2に合わせたエディター拡張アップデート
Unity5.3の機能まとめ
Unibook4執筆ガイドライン
わたしのVisual studio環境
Unibook3執筆ガイドライン
UNIBOOK2執筆ガイドライン
Unityでアプリを作るには
Unity2DとNewGUIについて
応用のみ
Editor10-提出方法
Unity Networkとの違い
CodeTemplateについて / SublimeText → Monodevelopに戻ってきた話
Editor スクリプティング 入門
エディタ拡張勉強会第0回
Unity3.5と4.0の違い
【第5回】渋谷Unity技術勉強会 - WebPlayer面白いよ!
Asset server(管理者編)
Unity games uplaod
Ad

基本答え&解説のみ