1.在Project面板新建Script Graph
2.給物體掛上該Graph
3.在Graph面板添加On Start事件節(jié)點(相當于腳本中的Start生命周期)
從Start綠色箭頭出拉出,并創(chuàng)建print方法節(jié)點
可以看到print方法節(jié)點需要一個Message參數
從print方法節(jié)點的Message圓點拉出并選擇String?
?
?在String數據節(jié)點中輸入數據NiHao
?點擊運行在Console面板可以看到NiHao
?文章來源:http://www.zghlxwxcb.cn/news/detail-536306.html
?相當于如下代碼文章來源地址http://www.zghlxwxcb.cn/news/detail-536306.html
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
print("NiHao");
}
}
到了這里,關于Unity可視化編程Visual Scripting學習筆記2:說你好(hello world)的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網!