my code "expected". help me

Сергей Булгаков 0 Reputation points
2023-08-29T08:49:24.38+00:00

my code

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

internal class Program
{
    private static void Main(string[] args)
    {
        [SerializeField] private float _speed;
        transform.Translate(-transform.forward * _speed * Time.fixedDeltaTime);
    }
}

public class Road : MonoBehaviour
{
    // Start is called before the first frame update
    private void Start()
    {
        
    }
    private void Update()
    // Update is called once per frame

    
    {
     private void FixedUpdate()
    }
    Move();
    {
    private void Move()
}
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
40,277 questions
{count} votes

1 answer

Sort by: Most helpful
  1. P a u l 10,746 Reputation points
    2023-08-29T09:08:02.0166667+00:00

    The braces for your methods looked a bit manged. Try this:

    public class Road : MonoBehaviour
    {
    	// Start is called before the first frame update
    	private void Start()
    	{
    	}
    
    	// Update is called once per frame
    	private void Update()
    	{
    	}
    
    	private void FixedUpdate()
    	{
    		Move();
    	}
    
    	private void Move()
    	{
    	}
    }
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.