Skip to content

Instantly share code, notes, and snippets.

View deprecatedcoder's full-sized avatar

Ryan Sullivan deprecatedcoder

View GitHub Profile
@NBaron
NBaron / VariablesInUnityMonoBehaviour.cs
Created November 6, 2018 11:59
How to properly declare variables in a Unity component?
using System;
using UnityEngine;
namespace awesomeCompanyName.awesomeProductName.relevantNaming
{
public class MyComponent : MonoBehaviour
{
private OtherComponent _usedOnlyByMe;
[SerializeField]
@IRCSS
IRCSS / SmoothGameCameraMovement.cs
Last active May 10, 2023 03:03
Unity Camera Movement in Game view like Scene View with filtering
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// Moves Camera similar to how camera is moved in the Unity view port. Drop the scrip on the game object which has the camera and you wish to move.
public class SmoothGameCameraMovement : MonoBehaviour
{
public float lateralSpeed = 0.0015f;