This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv, os, subprocess | |
def Main(): | |
unityPid = GetUnityProcessID() | |
if unityPid: | |
print('Error: Unity is running (process ID {})'.format(unityPid)) | |
return 1 | |
# Make sure we have all heads that we need to merge locally: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class ShipCamera : MonoBehaviour | |
{ | |
public GameObject m_Ship; | |
public Vector3 m_RelativePos; | |
void LateUpdate() | |
{ | |
//float scale = 0.05f; // Framerate dependent code, bad. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Workaround for 1087657 https://issuetracker.unity3d.com/issues/android-cullallvisiblelights-consume-too-much-cpu-when-only-baked-lights-are-used-in-the-scene | |
Light[] lights = (Light[])GameObject.FindObjectsOfType(typeof(Light)); | |
for (int i = 0; i < lights.Length; i++) | |
{ | |
Light light = lights[i]; | |
if (light.type == LightType.Point || light.type == LightType.Spot) // Assuming all your baked lights are these types | |
light.gameObject.SetActive(false); | |
} |