Guide for Unity Addressable Asset System.
Check out this sample code repo.
This guide supports languages below.
Created: 2020-07-03
Last updated: 2020-08-26 minor typo correction
using UnityEngine; | |
using System.Collections; | |
public class CameraShake : MonoBehaviour | |
{ | |
// Transform of the camera to shake. Grabs the gameObject's transform | |
// if null. | |
public Transform camTransform; | |
// How long the object should shake for. |
@RestController | |
@RequestMapping("registration") | |
public class InstanceRegistrationResource { | |
private final InstanceRegistrationService instanceRegistrationService; | |
public InstanceRegistrationResource(InstanceRegistrationService instanceRegistrationService) { | |
this.instanceRegistrationService = instanceRegistrationService; | |
} | |
@PostMapping("register") |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Serialization; | |
using UnityEngine; | |
public class JsonSerialisableScriptableObject<T> : ScriptableObject where T : JsonSerialisableScriptableObject<T> | |
{ |
using UnityEngine; | |
using Unity.Collections; | |
using Unity.Audio; | |
using Unity.Mathematics; | |
using Unity.Burst; | |
using System.Collections; | |
/* | |
For allocations inside AudioKernels, use Allocator.AudioKernel | |
*/ |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class MeshDestroy : MonoBehaviour | |
{ | |
private bool edgeSet = false; | |
private Vector3 edgeVertex = Vector3.zero; | |
private Vector2 edgeUV = Vector2.zero; |
using UnityEngine; | |
public class DepthScan : MonoBehaviour | |
{ | |
[SerializeField] private Camera cam; | |
[SerializeField] private Material mat; | |
[SerializeField] private float scanSpeed = 80f; | |
private float scanDistance; |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class Snake : MonoBehaviour { | |
// 軌跡 | |
struct Trail | |
{ | |
public Vector3 Position; | |
public Quaternion Rotation; |
// Quick try at doing a "print value" node for Unity ShaderGraph. | |
// Tested on Unity 2019.2.17 with ShaderGraph 6.9.2. | |
// | |
// Use with CustomFunction node, with two inputs: | |
// - Vector1 Value, the value to display, | |
// - Vector2 UV, the UVs of area to display at. | |
// And one output: | |
// - Vector4 Color, the color. | |
// Function name is DoDebug. |
using UnityEngine; | |
[RequireComponent( typeof(Camera) )] | |
public class FlyCamera : MonoBehaviour { | |
public float acceleration = 50; // how fast you accelerate | |
public float accSprintMultiplier = 4; // how much faster you go when "sprinting" | |
public float lookSensitivity = 1; // mouse look sensitivity | |
public float dampingCoefficient = 5; // how quickly you break to a halt after you stop your input | |
public bool focusOnEnable = true; // whether or not to focus and lock cursor immediately on enable |
Guide for Unity Addressable Asset System.
Check out this sample code repo.
This guide supports languages below.
Created: 2020-07-03
Last updated: 2020-08-26 minor typo correction