@@ -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();
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user