Skip to content

Instantly share code, notes, and snippets.

View LongChau's full-sized avatar
😣
Let's do it

Long Châu LongChau

😣
Let's do it
  • VNG
  • Vietnam
  • 13:30 (UTC +07:00)
View GitHub Profile
@kormyen
kormyen / GyroCamera.cs
Last active September 22, 2023 13:37
Unity3D script for rotating camera with a phone's gyro. Includes smoothing and initial offset. Edited from https://forum.unity3d.com/threads/sharing-gyroscope-camera-script-ios-tested.241825/
using UnityEngine;
using System.Collections;
public class GyroCamera : MonoBehaviour
{
// STATE
private float _initialYAngle = 0f;
private float _appliedGyroYAngle = 0f;
private float _calibrationYAngle = 0f;
private Transform _rawGyroRotation;
@cohenadair
cohenadair / firebase-sandbox.md
Last active December 15, 2024 18:31
Setting up development and production Firebase environments for iOS

Firebase Environments

Last updated: October 21st, 2019.

At the time of writing this gist (January 4th, 2017), I was unable to find true sandboxing to separate development and production environments for a Firebase project. The closest we can get is to create two separate Firebase projects -- one for development and one for production.

Pros

  • Complete separation and isolation of all Firebase features.
  • Freedom to experiment without risking the corruption of production data.

Cons

@tkyaji
tkyaji / UnityAssetBundleBuilder.cs
Last active September 22, 2023 13:51
[Unity] Build Asset Bundle, and upload to AWS-S3
using UnityEngine;
using UnityEngine.Networking;
using UnityEditor;
using System.Collections.Generic;
using System.IO;
using System.Security.Cryptography;
using System.Text;
using System;
anonymous
anonymous / Wireframe.cs
Created May 13, 2016 16:00
using UnityEngine;
using System.Collections;
public class Wireframe : MonoBehaviour
{
Mesh myMesh;
Mesh newMesh, newMeshBackground;
Vector3[] myVertices;
int[] myTriangles;
@SvDvorak
SvDvorak / WaveGenerator.cs
Last active July 8, 2023 02:09
Unity sound wave using line renderers
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// Creates a wave form based on an audiosource
/// Modified version of http://forum.unity3d.com/threads/making-sense-of-spectrum-data.90262
/// Make sure to plug in the _topLine and _bottomLine line renderers
public class WaveGenerator : MonoBehaviour
{
@reidblomquist
reidblomquist / Loader.cs
Created June 22, 2015 05:55
Loader and SoundManager scripts referenced in TextTyper class
using UnityEngine;
using System.Collections;
public class Loader : MonoBehaviour {
public GameObject gameManager;
public GameObject soundManager;
void Awake () {
if (gameManager && GameManager.instance == null)
@omgwtfgames
omgwtfgames / A set of Unity3D extension methods
Last active March 2, 2024 17:44
Some useful extension method for Unity3D
A collection of useful C# extension methods for the Unity engine.
@roachhd
roachhd / README.md
Created December 8, 2014 23:09
Games on GitHub

Games on GitHub

Below is a list of open source games and game-related projects that can be found on GitHub - old school text adventures, educational games, 8-bit platform games, browser-based games, indie games, GameJam projects, add-ons/maps/hacks/plugins for commercial games, libraries, frameworks, engines, you name it.

Contributing

If you'd like to add a repository to the list, please create an Issue, or fork this repository and submit a pull request.

Help: MarkDown Help, Markdown Cheatsheet

@darktable
darktable / SavWav.cs
Created April 6, 2012 05:01
Unity3D: script to save an AudioClip as a .wav file.
// Copyright (c) 2012 Calvin Rien
// http://the.darktable.com
//
// This software is provided 'as-is', without any express or implied warranty. In
// no event will the authors be held liable for any damages arising from the use
// of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions: