private static void DrawHandles(SuperColliderComponent component, GizmoType gizmoType) { // Only draw gizmos for the SuperObject if we have it in our set // This way users can disable gizmos for the SuperObject through the Gizmos menu if (!SuperColliderComponent.GizmoDrawCommands.Contains(component)) { return; } else { SuperColliderComponent.GizmoDrawCommands.Remove(component); } if (m_Settings == null) { m_Settings = ST2USettings.LoadSettings(); if (m_Settings == null) { // If something goes wrong use some dummy settings m_Settings = ScriptableObject.CreateInstance <ST2USettings>(); } } if (m_Settings != null) { ColliderGizmos.DrawColliders(component.gameObject, m_Settings); } }
// This is only invoked by a deployment batch file private static void DeploySuperTiled2Unity() { var settings = ST2USettings.LoadSettings(); var path = string.Format("{0}/../../deploy/SuperTiled2Unity.{1}.unitypackage", Application.dataPath, settings.Version); Directory.CreateDirectory(Path.GetDirectoryName(path)); AssetDatabase.ExportPackage("Assets/SuperTiled2Unity", path, ExportPackageOptions.Recurse); }
private void WrapImportContext(AssetImportContext ctx) { var settings = ST2USettings.LoadSettings(); if (settings == null) { settings = ScriptableObject.CreateInstance <ST2USettings>(); } var icons = ST2USettings.LoadIcons(); if (icons == null) { icons = ScriptableObject.CreateInstance <SuperIcons>(); } // Create a copy of our settings that we can override based on importer settings settings = GameObject.Instantiate <ST2USettings>(settings); OverrideSettings(settings); SuperImportContext = new SuperImportContext(ctx, settings, icons); }