浏览代码

Assorted cleanup and fixes

/seans-add-link-xml
Andre McGrail 4 年前
当前提交
4c8ebd71
共有 9 个文件被更改,包括 74 次插入40 次删除
  1. 2
      Assets/Data/UniversalRP/PipelineAsset_High.asset
  2. 4
      Assets/Scripts/Editor/LodLightmapCopy.cs
  3. 4
      Assets/Scripts/GameSystem/DefaultVolume.cs
  4. 23
      Assets/Scripts/GameSystem/InputControls.cs
  5. 4
      Assets/Scripts/GameSystem/RaceManager.cs
  6. 16
      Assets/Scripts/System/Benchmark.cs
  7. 38
      Assets/Scripts/Utility/Utility.cs
  8. 7
      Packages/com.verasl.water-system/Scripts/GerstnerWavesJobs.cs
  9. 16
      Packages/manifest.json

2
Assets/Data/UniversalRP/PipelineAsset_High.asset


m_LocalShadowsAtlasResolution: 256
m_MaxPixelLights: 0
m_ShadowAtlasResolution: 256
m_ShaderVariantLogLevel: 1
m_ShaderVariantLogLevel: 0

4
Assets/Scripts/Editor/LodLightmapCopy.cs


using UnityEditor.Build;
using UnityEditor.Build.Reporting;
using UnityEngine;
using UnityEngine.Rendering.Universal;
using UnityEngine.SceneManagement;
[InitializeOnLoad]

private static void Execute()
{
Debug.Log("Baking LOD Lightmap values");
if(UniversalRenderPipeline.asset.debugLevel != PipelineDebugLevel.Disabled)
Debug.Log("Baking LOD Lightmap values");
var lodGroups= Object.FindObjectsOfType<LODGroup>();
foreach (var lodGroup in lodGroups)
{

4
Assets/Scripts/GameSystem/DefaultVolume.cs


{
if(scene.buildIndex != 0)
return;
Debug.Log($"Injecting Default volume into scene:{scene.name}");
if(UniversalRenderPipeline.asset.debugLevel != PipelineDebugLevel.Disabled)
Debug.Log($"Injecting Default volume into scene:{scene.name}");
CreateVolumeManager();
}

23
Assets/Scripts/GameSystem/InputControls.cs


// GENERATED AUTOMATICALLY FROM 'Assets/Data/InputControls.inputactions'
//------------------------------------------------------------------------------
// <auto-generated>
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
// version 1.1.0
// from Assets/Data/InputControls.inputactions
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections;

public class @InputControls : IInputActionCollection, IDisposable
public partial class @InputControls : IInputActionCollection2, IDisposable
{
public InputActionAsset asset { get; }
public @InputControls()

public void Disable()
{
asset.Disable();
}
public IEnumerable<InputBinding> bindings => asset.bindings;
public InputAction FindAction(string actionNameOrId, bool throwIfNotFound = false)
{
return asset.FindAction(actionNameOrId, throwIfNotFound);
}
public int FindBinding(InputBinding bindingMask, out InputAction action)
{
return asset.FindBinding(bindingMask, out action);
}
// BoatControls

4
Assets/Scripts/GameSystem/RaceManager.cs


using UnityEngine.SceneManagement;
using BoatAttack.UI;
using UnityEngine.Playables;
using UnityEngine.Rendering.Universal;
using Random = UnityEngine.Random;
namespace BoatAttack

private void Awake()
{
Debug.Log("RaceManager Loaded");
if(UniversalRenderPipeline.asset.debugLevel != PipelineDebugLevel.Disabled)
Debug.Log("RaceManager Loaded");
Instance = this;
}

16
Assets/Scripts/System/Benchmark.cs


}
}
[Serializable]
public class PerfBasic
{
public TestInfo info;

}
}
[Serializable]
public class TestInfo
{
public string Scene;

public TestInfo()
{
Scene = SceneManager.GetActiveScene().name.Replace(" ", "");
Scene = Utility.RemoveWhitespace(SceneManager.GetActiveScene().name);
Platform = Application.platform.ToString().Replace(" ", "");
API = SystemInfo.graphicsDeviceType.ToString().Replace(" ", "");
CPU = SystemInfo.processorType.Replace(" ", "");
GPU = SystemInfo.graphicsDeviceName.Replace(" ", "");
Os = SystemInfo.operatingSystem.Replace(" ", "");
Quality = QualitySettings.names[QualitySettings.GetQualityLevel()].Replace(" ", "");
Platform = Utility.RemoveWhitespace(Application.platform.ToString());
API = Utility.RemoveWhitespace(SystemInfo.graphicsDeviceType.ToString());
CPU = Utility.RemoveWhitespace(SystemInfo.processorType);
GPU = Utility.RemoveWhitespace(SystemInfo.graphicsDeviceName);
Os = Utility.RemoveWhitespace(SystemInfo.operatingSystem);
Quality = Utility.RemoveWhitespace(QualitySettings.names[QualitySettings.GetQualityLevel()]);
Resolution = $"{Display.main.renderingWidth}x{Display.main.renderingHeight}";
}
}

38
Assets/Scripts/Utility/Utility.cs


using UnityEditor;
#endif
using System;
using System.Text.RegularExpressions;
using UnityEngine.Rendering.Universal;
#if UNITY_EDITOR
[InitializeOnLoad]
#endif
public class Utility
public static class Utility
#if UNITY_EDITOR
static Utility()
{
// setup the things
Debug.Log("Setting up some utilities");
EditorApplication.update += CheckQualityLevel;
}
#endif
Debug.Log($"Quality level changed:{lastQualityLevel} to {curLevel}");
if(UniversalRenderPipeline.asset.debugLevel != PipelineDebugLevel.Disabled)
Debug.Log($"Quality level changed:{lastQualityLevel} to {curLevel}");
public static string RemoveWhitespace(string input)
{
return Regex.Replace(input, @"\s+", "");
}
#if UNITY_EDITOR
[InitializeOnLoad]
internal class UtilityScheduler
{
static UtilityScheduler()
{
// setup the things
if(UniversalRenderPipeline.asset.debugLevel != PipelineDebugLevel.Disabled)
Debug.Log("Setting up some utilities");
EditorApplication.update += Utility.CheckQualityLevel;
}
}
#endif
}

7
Packages/com.verasl.water-system/Scripts/GerstnerWavesJobs.cs


using Unity.Burst;
using Unity.Mathematics;
using Unity.Collections;
using UnityEngine.Rendering.Universal;
using WaterSystem.Data;
namespace WaterSystem

public static void Init()
{
Debug.Log("Initializing Gerstner Waves Jobs");
if(UniversalRenderPipeline.asset.debugLevel != PipelineDebugLevel.Disabled)
Debug.Log("Initializing Gerstner Waves Jobs");
//Wave data
_waveCount = Water.Instance._waves.Length;
_waveData = new NativeArray<Wave>(_waveCount, Allocator.Persistent);

public static void Cleanup()
{
Debug.Log("Cleaning up Gerstner Wave Jobs");
if(UniversalRenderPipeline.asset.debugLevel != PipelineDebugLevel.Disabled)
Debug.Log("Cleaning up Gerstner Wave Jobs");
_waterHeightHandle.Complete();
//Cleanup native arrays

16
Packages/manifest.json


{
"dependencies": {
"com.unity.2d.sprite": "1.0.0",
"com.unity.addressables": "1.11.2",
"com.unity.addressables": "1.13.1",
"com.unity.cinemachine": "2.6.0",
"com.unity.ide.rider": "2.0.5",
"com.unity.cinemachine": "2.6.2",
"com.unity.ide.rider": "2.0.7",
"com.unity.ide.vscode": "1.2.1",
"com.unity.ide.vscode": "1.2.2",
"com.unity.mathematics": "1.1.0",
"com.unity.memoryprofiler": "0.2.4-preview.1",
"com.unity.mathematics": "1.2.1",
"com.unity.memoryprofiler": "0.2.5-preview.1",
"com.unity.textmeshpro": "3.0.0-preview.14",
"com.unity.timeline": "1.3.4",
"com.unity.textmeshpro": "3.0.1",
"com.unity.timeline": "1.4.2",
"com.unity.ugui": "1.0.0",
"net.peeweek.gameplay-ingredients": "https://github.com/peeweek/net.peeweek.gameplay-ingredients.git#2019.3.0",
"com.unity.modules.ai": "1.0.0",

正在加载...
取消
保存