using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
// Start is called before the first frame update
Rigidbody rigidbody;
float force = 100.0f;
void Start(){
rigidbody = GetComponent<Rigidbody>();
}
// Update is called once per frame
void Update()
{
this.rigidbody.AddForce(this.transform.forward * force, ForceMode.Force);
}
}
unityには
Assets/NewBehaviourScript.cs(13,13): error CS0103: The name 'GetComponet' does not exist in the current context
とあり、GetComponetの定義がなされてないとのことですが、どうやって定義すれば良いのでしょうか。
この質問の投稿者はすでに退会しているため、質問者からの返信がない点にご留意ください。
回答1件
この質問の投稿者はすでに退会しているため、質問者からの返信やベストアンサーの選定がない点にご留意ください。
あなたの回答
tips
プレビュー