[Unity][Fungus]脚本代码拓展--获得或者设置变量

 

 

选中Flowchart物体在Inspector视图或者Flowchart视图中都可以添加、删除 变量Variables

变量的类型,名称,Public、Private、Global

变量类型可以为Boolean\Float\Integer\String\Other\Animator\AudioSource\Color\GameObject\Material\Object\Rigidbody2D\Sprite\Texture\Transform\Vector2\Vector3

[Unity][Fungus]脚本代码拓展--获得或者设置变量

在Fungus的手册中,参考资料1,找到关键字,在Fungus手册的右上角搜索框中搜索

[Unity][Fungus]脚本代码拓展--获得或者设置变量

设置变量的代码

SetStringVariable()

SetIntegerVariable()

SetFloatVariable()

SetTransformVariable()

SetGameObjectVariable()

SetBooleanVariable()

 

传递消息的代码

SendFungusMessage()

 

获得变量的代码

GetVariable()

GetFloatVariable()

GetIntegerVariable()

GetStringVariable()

GetBooleanVariable()

GetTransformVariable()

GetGameObjectVariable()

 

 


 

 


 

 

参考资料:

1.v3.11.4 Documentation

2.

3.