Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity how to make a class

public class Stuff
{
  public int bullets;
  public int grenades;
  public int rockets;

  public Stuff(int bul, int gre, int roc)
  {
    bullets = bul;
    grenades = gre;
    rockets = roc;
   }
}
Source by learn.unity.com #
 
PREVIOUS NEXT
Tagged: #unity #class
ADD COMMENT
Topic
Name
6+2 =