Skip to content

Instantly share code, notes, and snippets.

@tsubaki tsubaki/AutoSim.cs

Last active May 4, 2018
Embed
What would you like to do?
using UnityEngine;
public class AutoSim : MonoBehaviour {
private void Awake()
{
Physics.autoSimulation = false;
}
private void OnDestroy()
{
Physics.autoSimulation = true;
}
void FixedUpdate () {
Physics.Simulate(Time.fixedDeltaTime);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.