Skip to content

Instantly share code, notes, and snippets.

View made-indrayana's full-sized avatar
:octocat:
curious

Made Indrayana made-indrayana

:octocat:
curious
View GitHub Profile
@made-indrayana
made-indrayana / DisableSteamVRUnreal.md
Created May 13, 2021 13:41
Disabling SteamVR from launching in Unreal

How to disable Steam VR Auto-Start when Unreal Engine Starts

  1. Go to engine folder: WhereverYourEngineIs\UE_4.xx\Engine\Plugins\Runtime\Steam\SteamVR\
  2. Inside that folder, open up "SteamVR.uplugin" file with notepad and set "EnabledByDefault" to false.
  3. TO BE TESTED: Also set the file to read only, since I found that it can be reset for some reason.
@made-indrayana
made-indrayana / FMODCrashCourse.cs
Last active August 6, 2021 14:13
FMOD Programming Crash Course
// FMOD Crash Course for Programmer
// written by Made Indrayana
// MIT License
using UnityEngine;
public class FMODCrashCourse : MonoBehaviour
{
// String as reference with FMOD Picker
[FMODUnity.EventRef] public string eventName;
@made-indrayana
made-indrayana / DemoPlayerController.cs
Last active April 6, 2023 16:40
Basic PlayerController for 3D scene. Copeid from Google Resonance Unity SDK.
// Copyright 2017 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@made-indrayana
made-indrayana / FMODOutputUtils.cs
Last active August 6, 2021 14:25
I created this script to tackle the biggest problem when combining FMOD and Oculus VR Framework --- FMOD's audio only outputs to the currently used system audio device and not mirror its output to the VR headset, unlike when using SteamVR.
// FMOD Output Setter - Editor script
// Author: Made Indrayana
// MIT License
// Create a window in Unity to be able to explicitly select FMOD's audio output and auto enable it on every Play Mode.
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using FMODUnity;
@made-indrayana
made-indrayana / IEnumCircularTest.cs
Created July 2, 2021 10:19
Making a recurring IEnum with Update-like behaviour for Unity
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class IEnumTest : MonoBehaviour
{
public bool isTracking = false;
// Trigger to start, can be whatever
void Start()
@made-indrayana
made-indrayana / ResonanceLocationBugFix.cs
Last active August 6, 2021 14:54
Location fix by forcing an AudioSource to continually stop and play to force localization update on Google Resonance
// Google Resonance Audio Location Bug Fix
// Author: Made Indrayana
// MIT License
// Location fix by forcing an AudioSource to continually stop and play to force localization update on Google Resonance
// Use a 100ms empty WAV
public class ResonanceLocationBugFix : MonoBehaviour
{
[SerializeField]
@made-indrayana
made-indrayana / Singleton.cs
Last active September 22, 2021 15:08
Generic persistent Singleton script for Unity
// MonoBehaviour Singleton Template
// Author: Made Indrayana
// MIT License
using UnityEngine;
public class Singleton<T> : MonoBehaviour
where T : Component
{
public static T Instance { get; private set; }
@made-indrayana
made-indrayana / pointer-reference.cpp
Created August 6, 2021 14:29
This program is created to display the usage of pass-by-value, pass-by-reference and pointer in C++.
// main.cpp
// Reference and Co.
// Author: Made Indrayana
// MIT License
// This program is created to display the usage of pass-by-value, pass-by-reference and pointer in C++.
#include <iostream>
using namespace std;
@made-indrayana
made-indrayana / ReadOnlyAttribute.cs
Created August 6, 2021 14:33
Read Only attribute for Unity's Inspector
// ReadOnlyAttribute.cs
// Author: Made Indrayana
// MIT License
// Variables with this attribute will be shown in Inspector but will be grayed out and not editable.
using UnityEngine;
public class ReadOnlyAttribute : PropertyAttribute { }
@made-indrayana
made-indrayana / LinearDecibelConverter.cs
Last active August 6, 2021 15:10
Small utilities to convert Linear value (0-1) to dB and vice versa - Yes I'm looking at you Unity - as well as FMODs Internal Bus Volume
// LinearDecibelConverter.cs
// Author: Made Indrayana
// MIT License
// Small utilities to convert Linear value (0-1) to dB and vice versa
public class LinearDecibelConverter
{
public float LinearToDecibel(float linear)
{
float dB;