스터디/Unity 2018. 11. 16. 17:22

[Unity] Playmaker 플레이메이커 공식 튜토리얼 리스트

스터디/Unity 2018. 11. 16. 14:08

[Unity] 플레이메이커 Playmaker 이벤트 리스트

System Events


Core Events

NOTE: "game object" refers to the game object that owns the FSM.

EventDescriptionUnity Docs
STARTSent when the state machine is enabled.N.A.
FINISHEDSent when all actions on the active state have finished. See Actions.N.A.
LEVEL LOADEDSent after a new level is loaded.OnLevelWasLoaded
BECAME VISIBLESent when the game object becomes visible by any camera.OnBecameVisible
BECAME INVISIBLESent when the game object is no longer visible by any camera.OnBecameInvisible

 

Physics Events

NOTE: After a COLLISION or TRIGGER event you can use GetCollisionInfoGetTriggerInfo, or GetControllerHitInfo to get more info on the collision/trigger event.

COLLISION ENTERSent when the game object first collides with another object.OnCollisionEnter
COLLISION EXITSent when the game object stops colliding with another object.OnCollisionExit
COLLISION STAYSent while the game object is colliding with another object.OnCollisionStay
TRIGGER ENTERSent when the game object enters a trigger volume.OnTriggerEnter
TRIGGER EXITSent when the game object exits a trigger volume.OnTriggerExit
TRIGGER STAYSent while the game object stays inside a trigger volume.OnTriggerStay
CONTROLLER COLLIDER HITSent when the character controller on the game object collides with an object.OnControllerColliderHit
COLLISION ENTER 2DSent when the game object first collides with a 2D Collider.OnCollisionEnter2D
COLLISION EXIT 2DSent when the game object stops colliding with a 2D Collider.OnCollisionExit2D
COLLISION STAY 2DSent while the game object is colliding with a 2D Collider.OnCollisionStay2D
TRIGGER ENTER 2DSent when the game object enters a 2D Trigger.OnTriggerEnter
TRIGGER EXIT 2DSent when the game object exits a 2D Trigger.OnTriggerExit
TRIGGER STAY 2DSent while the game object stays inside a 2D Trigger.OnTriggerStay
PARTICLE COLLISIONSent when a particle hits a Collider. See unity docs for more info.OnParticleCollision
JOINT BREAKSent when a Joint attached to the same game object breaks.OnJointBreak
JOINT BREAK 2DSent when a Joint2D attached to the same game object breaks.OnJointBreak2D

 

Mouse Events

TIP: Mouse events are useful in state machines that control GUIText or GUITexture components. See GUI Element Actions.

MOUSE DOWNSent when the mouse clicks on the game object.OnMouseDown
MOUSE DRAGSent while the mouse button is down and over the game object.OnMouseDrag
MOUSE ENTERSent when the mouse rolls over the game object.OnMouseEnter
MOUSE EXITSent when the mouse rolls off the game object.OnMouseExit
MOUSE OVERSent while the mouse is over the game object.OnMouseOver
MOUSE UPSent when the mouse button is released over the game object.OnMouseUp
MOUSE UP AS BUTTONSent when the mouse button is released over the same GUI Element or Collider it was pressed on.OnMouseUpAsButton

 

Application Events

APPLICATION FOCUSSent when the Application gets focus.
APPLICATION PAUSESent when the Application is paused.
APPLICATION QUITSent right before the Application quits.

 

UI Events

NOTE: The owner needs the appropriate UI Components to send UI Events. If you want to target other GameObjects use UI Actions.

UI CLICKSent when a Button is pressed. Game object needs a Button component.
UI BEGIN DRAGSent before a drag is started.
UI DRAGSent every time the pointer is moved during dragging.
UI END DRAGSent when a drag is ended.
UI DROPSent when an object accepts a drop.
UI POINTER UPSent when a mouse click is released.
UI POINTER CLICKSent when a click is detected.
UI POINTER DOWNSent during ongoing mouse clicks until release of the mouse button
UI POINTER ENTERSent when the mouse begins to hover over the GameObject.
UI POINTER EXITSent when the mouse stops hovering over the GameObject.
UI BOOL VALUE CHANGEDSent when a Toggle value changes. Game object needs a Toggle component. Use Get Event Bool Data to get the value.
UI FLOAT VALUE CHANGEDSent when a Slider or Scrollbar value changes. Game object needs a Slider or Scrollbar component. Use Get Event Float Data to get the value.
UI INT VALUE CHANGEDSent when a Dropdown selection changes. Game object needs a Dropdown component. Use Get Event Int Data to get the value.
UI VECTOR2 VALUE CHANGEDSent when a ScrollRect value changes. Game object needs a ScrollRect component. Use Get Event Vector2 Data to get the value.
UI END EDITSent when when editing of an InputField has ended. Owner needs an InputField component.

 



User Events

User events are usually named for clarity: Open Door, Turn On, Turn Off etc.

You can make/edit these events in the Event Manager.

Sending Events

There are a few ways to send events to an FSM:

  • Using Actions
  • Using Animation Events
  • Sending event from scripts.

Sending Events From Actions

The most basic Actions to send an event:

Other Actions send events based on conditions:

Events are essential to the flow of an FSM, so many actions send them.

Global Events

Events can be marked as Global in the Event Manager. Global events can be sent between FSMs.

Do not confuse Global Events with Global Transitions.

Event Data

You can associate data with an event using Set Event Data. For example, you could set the amount of damage to inflict with a Do Damage event.

You can get information and data associated with an event using Get Event Info. For example, you could read the amount of damage associated with a Do Damage event.


*콜리젼과 트리거 차이?


스터디/Unity 2018. 11. 16. 13:51

[Unity] 플레이메이커 Playmaker 액션 레퍼런스 리스트

Action Reference

https://hutonggames.fogbugz.com/default.asp?W2



Animate Variables Actions

These actions animate variable values over time using curves and easing. Use these actions to animate parameters in other actions.

Animation Actions

OTE: These actions use the Legacy Animation System in Unity. There is a newer animation system called Mecanim Animator that can be controlled with Animator Actions. However, in some situations it can be simpler to use these animation actions.
Most Animation Actions require an Animation Component on the game object. 
*가끔 옵션들이 히든되어있을수 있기 때문에 Debug 뷰 선택해야 될 수 있음
애니메이션과 애니메이션이벤트를 유니티 Animation View 에서 생성할 수 있다. 이렇게 만들어진 애니메이션은 PlaymakerFSM으로 animation events 형태로 전달 가능하다
- 게임오브젝트를 서택해서 Window>Animation에서 애니메이션을 추가하고, 타임라인에 애니메이션이벤트를 추가한다. 그리고 SendEvent(String) 함수를 선택하여 보낼 이벤트명 설정. 그러면 PlaymakerFSM에서 보내짐



유니티 Legacy Animation System


Animator Actions

Animator Actions use Unity's powerful Mecanim Animator System. Most Animator Actions require an Animator Component on the game object. 

유니티 Mecanim Animator System


Application Actions

https://hutonggames.fogbugz.com/default.asp?W671

High level actions to control the application.


Array Actions

https://hutonggames.fogbugz.com/default.asp?W1196

These actions are used with Array Variables. An Array lets you work with a collection of values.



Audio Actions

Audio actions control AudioSource components on game objects. Note, the AudioSource component provides a nice GUI to control advanced audio features. 


Camera Actions



Character Actions

Character Actions work with a Character Controller on a Game Object.


Color Actions

Color actions manipulate color variables.

https://hutonggames.fogbugz.com/default.asp?W417



Convert Actions

Convert Actions convert variables between different types.

NOTE: 1.9.0 can now auto-convert between many variable types.


Debug Actions



Device Actions

https://hutonggames.fogbugz.com/default.asp?W490

모바일 디바이스



Effects Actions

https://hutonggames.fogbugz.com/default.asp?W198


Enum Actions

https://hutonggames.fogbugz.com/default.asp?W1197


GameObject Actions

GameObject Actions deal with Unity Game Objects and the scene hierarchy.


GUI Actions

GUI actions require manual placement. For automatically laid out controls see GUI Layout Actions.

Unity also has a GUI Element system which uses GUIText and GUITexture components on game objects. See GUI Element Actions

See also PlayMakerGUI Inspector


GUI Element Actions

https://hutonggames.fogbugz.com/default.asp?W361

GUI Elements are set up in the Unity editor by adding GUIText or GUITexture components to a game object (Main Menu > Component > Rendering...).

These GUI Elements respond to mouse events in Playmaker (MOUSE OVER, MOUSE DOWN...), so it's very easy to set up their states.

GUI Element actions control the appearance of GUI Elements:


GUILayout Actions

https://hutonggames.fogbugz.com/default.asp?W414
GUILayout actions mirror Unity's GUILayout system. See Unity Docs.


 

Input Actions



Level Actions

Level actions deal with level loading and creation.


Lights Actions

https://hutonggames.fogbugz.com/default.asp?W384

Lights actions perform operations on Unity Lights.



Logic Actions

Logic actions perform comparisons and tests on variables. (Compare, Test, Switch...). They generally send events based on the results.


Material Actions


Mesh Actions



Unity Physics docs:

Vector3 Actions

Physics actions make heavy use of Vector3 variables. See Vector3 Actions.


Physics 2d Actions

https://hutonggames.fogbugz.com/default.asp?W1267


PlayerPrefs Actions

https://hutonggames.fogbugz.com/default.asp?W545


Quaternion Actions

https://hutonggames.fogbugz.com/default.asp?W1258



Rect Actions

https://hutonggames.fogbugz.com/default.asp?W673



Rect Transform Actions

https://hutonggames.fogbugz.com/default.asp?W1580



RenderSettings




Scene Actions




ScriptControl Actions




StateMachine Actions

https://hutonggames.fogbugz.com/default.asp?W15



String Actions