Search Unity

  1. We would like to hear your feedback about Unity and our products. Click here for more information.
    Dismiss Notice

Need help to create custom ID to cube!

Discussion in 'Documentation' started by meszarosbundas, May 16, 2019.

  1. meszarosbundas

    meszarosbundas

    Joined:
    Mar 31, 2019
    Posts:
    12
    Hi ,i create a script for Cube id but unity always say :
    kocka.cs(3,22): error CS0246: The type or namespace name `Cube' could not be found. Are you missing an assembly reference?, can u help me? Thanks.


    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    public class Kocka : Cube
    {
    private int id;

    void setId(int id)
    {
    this.id = id;
    }

    int getId()
    {
    return this.id;
    }
    }
     
  2. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    3,640
    What is this Cube you are referring to? Where did it come from? (BTW, advice: try to keep your class and variable names in English, most people here does not read Hungarian ;) )