Disclaimer: This article intends to be a primer so that you may gain insight in order to understand beginner OOP articles better (for example on wikipedia). In order to grasp more abstract concepts, suspend as much logic as you would when watching Star Trek. Message not sponsored by anyone I know. Some neurons dissipated during the writing of this.
Unity3D Scripting API #4 : Update() ☑️
⭐ Update(): ☑️ This method is called continuously every frame ☑️ The Update() method is good for receiving inputs from the user continuously. Anything that needs to change or be adjusted regularly will be written inside the Update() method for example⏱️ Timers. ☑️ Also used for non-physics based movement for example non-physics based character controller in 2D games ☑️ Update() depends on the game’s refresh
Unity3D Scripting API #3 – Start() 🏁
💚MonoBehaviour💚 is the base class from which every Unity script derives. Any Unity3D script that you create will extend from the MonoBehaviour class. The MonoBehaviour class will execute events in a pre-determined order. 🍱Method: A method is a function that performs a specific task. So these methods are performing a specific function. For example whatever code is written inside the Start() will execute on the
Unity3D Scripting API -2: MonoBehaviour
💚MonoBehaviour💚 is the base class from which every Unity script derives. Any Unity3D script that you create will extend the MonoBehaviour class. Ok what is a class? When you make a new Unity3D script, the class name will be the same as the file name. A class is like a container for your variables and functions. They’re organized together and perform a specific function in
Introduction to the Unity3D Scripting API – 1
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: UnityEngine namespace: collection of pre-built classes, events, interfaces etc
VR Lesson #3: Grab items in VR with hands
The last tutorial focused on grabbing items in virtual reality using the raycaster with Unity3D’s new input system. In this tutorial we go over using hands prefab to grab objects in VR and throw them around. The full tutorial can be found here
VR Lessons #2: Grab items in Virtual Reality
Here is another short tutorial from my VR lesson series here This tutorial uses the new input system to create an interactor. An XR interactor is an object in a scene that can select or move another object in the scene. For example the pointer or your hands in VR. Check out all the full tutorial with steps here
Functions as objects
In JavaScript functions are a type of object known as function object. You can work with function objects as though they were objects. Functions may be assigned to objects, passed in as arguments to other functions, returned from other functions. Additionally a function can be passed into an array. And this gets me to earlier in my articles when I’ve stated “almost everything in JavaScript
Getters & Setters in JavaScript – part 3
Setters in JavaScript. Check out parts 1 and 2 Setters in JavaScript There are three ways you can use setters:1. Default method syntax2. get keyword3. Object.defineProperty() method We will now discuss the above three in detail. 1. Default method syntax The default method syntax can also be used for setters. Setters will set the property of theobject to the value passed in to the setter
Getters & Setters in JavaScript – part 2
carrying on from part 1 .. Getters in JavaScript Getters are functions that retrieve a value from static properties from an external source. You can only access properties and cannot access methods as they are functions of an object or class and are not static.There are three ways you can use getters and setters:1. Default method syntax2. get keyword3. Object.defineProperty() method We will now discuss
Classes in JavaScript – a newbie friendly introduction
Classes In object-oriented programming, class types are templates for creating objects. As we justlearned that in prototypal inheritance, objects inherit properties and methods from aprototype. Classes build upon prototypal inheritance. Classes were introduced in ES6 tomimic the class data type found in Java and other object-oriented programming languages. Till now developers used constructor functions to mimic object-oriented design patterns.JavaScript does not have the class type,
- 1
- 2
- 3
- …
- 16
- Next Page »