Teaching Newbies since 2014

  • Home
  • Javascript ❤
    • JavaScript
    • Node.js
  • WebDev Tuts
  • screencasts
  • Resources
  • VR & AR
  • Github
  • Twitter
  • YouTube
  • RSS
  • C++
You are here: Home / Unity3D / Introduction to the Unity3D Scripting API – 1

January 22, 2021 by: Kauress

Introduction to the Unity3D Scripting API – 1

https://i0.wp.com/media.sproutsocial.com/uploads/2015/04/What-is-an-API.png?resize=339%2C192&ssl=1
Image credits: https://sproutsocial.com/insights/what-is-an-api/

The Unity3D scripting API is a collection of namespaces.

API stands for Application Programming Interface. It allows 2 applications to talk to each other.

A namespace is a collection of classes, events, enumerations, delegates, interfaces etc that handle a specific task each. So each namespace will handle a specific task each.

The most common namespaces are:

  1. UnityEngine namespace: collection of pre-built classes, events, interfaces etc that allow us to work with the Unity3D engine.
  2. UnityEditor namespace: UnityEditor namespace is a collection of pre-built classes, events, structures, enumerations, delegates, interfaces etc that allow us to extend the functionality of the Unity3D editor.
  3. System namespace: part of the .NET framework which is used behind the scenes by the Unity3d game engine. It is a is a collection of, events, interfaces, delegates , structures, enumerations etc that allow us to create and use common data structures

Essentially namespaces are like containers for classes and we can access all the classes of these namespaces in our script.

//using imports a namespace
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CubeController : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()


    // Update is called once per frame
    void Update()
    {


    }
}
VR Lesson #3: Grab items in VR with hands
Unity3D Scripting API -2: MonoBehaviour

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Copyright © 2022 ·Kauress

Go to mobile version