Skip to content

Instantly share code, notes, and snippets.

@tsubaki
Last active May 4, 2018 10:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsubaki/52bcf6b495f6f435c8ea1dca730c15d3 to your computer and use it in GitHub Desktop.
Save tsubaki/52bcf6b495f6f435c8ea1dca730c15d3 to your computer and use it in GitHub Desktop.
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