我是团结的新手,我只是想知道如何设置C#的材料?
我有一个预制模型,我可以从编辑器更改纹理没问题.我想要做的是在生成预制件实例时随机设置材料.
这是我要改变的字段:
我正在使用以下代码创建它们:
Instantiate(eggPrefab, spawnPos, Quaternion.identity);
Run Code Online (Sandbox Code Playgroud)
(其中eggPrefab是一个公共变换).
我希望这是足够的信息!
谢谢.
我查看了其他一些答案,但确实无法正常工作。
我想从 Alexa 调用 lambda - 这很好,并给了我一个回应。我想将此响应基于对 http GET Web 服务的调用。到目前为止,我已经获得了以下代码(已更新以显示完整的 lambda 代码):
/**
Copyright 2016 Brian Donohue.
*/
'use strict';
// Route the incoming request based on type (LaunchRequest, IntentRequest,
// etc.) The JSON body of the request is provided in the event parameter.
exports.handler = function (event, context) {
try {
console.log("event.session.application.applicationId=" + event.session.application.applicationId);
/**
* Uncomment this if statement and populate with your skill's application ID to
* prevent someone else from configuring a skill that sends …Run Code Online (Sandbox Code Playgroud)