Revert "1"

This reverts commit b65b45c062.
This commit is contained in:
CortexCore
2024-11-14 21:54:24 +08:00
parent b65b45c062
commit f446abaaaa
368 changed files with 400 additions and 1785 deletions

View File

@@ -110,8 +110,6 @@ namespace Net.Like.Xue.Tokyo
//生成玩家
serviceCollection.AddSingleton<GameSpawnPlayerService>();
serviceCollection.AddSingleton<YooAssetMaterialFix>();
//获取服务提供者
var serviceProvider = serviceCollection.BuildServiceProvider();
@@ -158,8 +156,6 @@ namespace Net.Like.Xue.Tokyo
serviceProvider.GetRequiredService<UXConsole>();
serviceProvider.GetRequiredService<YooAssetMaterialFix>();
Application.targetFrameRate = 90;
await destroyCancellationToken.WaitUntilCanceled();

View File

@@ -3,10 +3,17 @@ using System.Collections.Generic;
using BITKit;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace Net.Like.Xue.Tokyo.Weather
{
public class ScriptableWeather : ScriptableObject
{
#if UNITY_EDITOR
[SerializeField] private LightingDataAsset lightingDataAsset;
#endif
[SerializeField] private Vector3 sunLightDirection = new Vector3(0, 1, 0);
[SerializeField] private Color sunLightColor;
[SerializeField] private float sunLightIntensity = 1;
@@ -18,6 +25,10 @@ namespace Net.Like.Xue.Tokyo.Weather
[BIT]
public void Save()
{
#if UNITY_EDITOR
lightingDataAsset = Lightmapping.lightingDataAsset;
#endif
sunLightDirection = RenderSettings.sun.transform.eulerAngles;
sunLightIntensity = RenderSettings.sun.intensity;
sunLightColor = RenderSettings.sun.color;
@@ -27,11 +38,17 @@ namespace Net.Like.Xue.Tokyo.Weather
fogMode = RenderSettings.fogMode;
fogColor = RenderSettings.fogColor;
fogDensity = RenderSettings.fogDensity;
#if UNITY_EDITOR
EditorUtility.SetDirty(this);
#endif
}
[BIT]
public void Load()
{
#if UNITY_EDITOR
Lightmapping.lightingDataAsset = lightingDataAsset;
#endif
RenderSettings.sun.transform.eulerAngles = sunLightDirection;
RenderSettings.sun.intensity = sunLightIntensity;
RenderSettings.skybox = skyboxMaterial;