블로그 이미지
Every unexpected event is a path to learning for you.

카테고리

분류 전체보기 (2324)N
Unity3D (568)
Programming (472)
Unreal (4)
Gamebryo (56)
Tip & Tech (185)N
협업 (34)
3DS Max (3)
Game (12)
Utility (116)
Etc (92)
Link (31)
Portfolio (19)
Subject (90)
iOS,OSX (38)
Android (13)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (1)
Memories (19)
Interest (37)
Thinking (36)
한글 (26)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (19)
Exercise (3)
나만의 맛집 (2)
냥이 (9)
육아 (9)
Total1,344,600
Today25
Yesterday150
Statistics Graph

달력

« » 2019.12
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

공지사항

태그목록

'DisplayWizard'에 해당되는 글 1건

  1. 2012.12.04 DisplayWizard(에디터로 쓸모가 많을 듯 한..)

ScriptableWizard.DisplayWizard

static function DisplayWizard.<T> (title : String) : T

Parameters

NameDescription
TThe class implementing the wizard. It has to derive from ScriptableWizard.
titleThe title shown at the top of the wizard window.

Returns

T - The wizard.

Description

Creates a wizard.

When the user hits the Create button OnWizardCreate function will be called. DisplayWizard will only show one wizard for every wizard class.


Simple Wizard Window that copies a GameObject several times.

// C#
// Simple Wizard that clones an object.

using UnityEngine;
using UnityEditor;
using System.Collections;

public class ScriptableWizardDisplayWizard : ScriptableWizard {

public GameObject ObjectToCopy = null;
public int numberOfCopies = 2;
[MenuItem ("Example/Show DisplayWizard usage")]
static void CreateWindow() {
// Creates the wizard for display
ScriptableWizard.DisplayWizard("Copy an object.",
typeof(ScriptableWizardDisplayWizard),
"Copy!");
}
void OnWizardUpdate() {
helpString = "Clones an object a number of times";
if(!ObjectToCopy) {
errorString = "Please assign an object";
isValid = false;
} else {
errorString = "";
isValid = true;
}
}
void OnWizardCreate () {
for(int i = 0; i < numberOfCopies; i++)
Instantiate(ObjectToCopy, Vector3.zero, Quaternion.identity);
}
}

static function DisplayWizard.<T> (title : String, createButtonName : String) : T

static function DisplayWizard.<T> (title : String, createButtonName : String, otherButtonName : String) : T

static function DisplayWizard (title : String, klass : System.Type, createButtonName : String = "Create", otherButtonName : String = "") : ScriptableWizard

Parameters

NameDescription
TThe class implementing the wizard. It has to derive from ScriptableWizard.
titleThe title shown at the top of the wizard window.
classThe class implementing the wizard. It has to derive from ScriptableWizard.
createButtonNameThe text shown on the create button.
otherButtonNameThe text shown on the optional other button. Leave this parameter out to leave the button out.

Returns

ScriptableWizard - The wizard.

Description

Creates a wizard.

When the user hits the Create button OnWizardCreate function will be called. DisplayWizard will only show one wizard for every wizard class.



출처 : http://docs.unity3d.com/Documentation/ScriptReference/ScriptableWizard.DisplayWizard.html

'Unity3D > Script' 카테고리의 다른 글

InGame Button  (0) 2012.12.14
InvokeRepeating  (0) 2012.12.07
DisplayWizard(에디터로 쓸모가 많을 듯 한..)  (0) 2012.12.04
Replace game object with prefab?  (0) 2012.12.04
폰트의 픽셀정보로 문자열을 Mesh들로 생성하여 보여주기  (0) 2012.11.24
Interpolate  (0) 2012.11.22
Posted by blueasa

댓글을 달아 주세요