Merge branch 'freature/webgl' into OctopusSimulator/1111merged

This commit is contained in:
2025-11-11 13:55:08 +09:00
6 changed files with 153 additions and 14 deletions

View File

@@ -1,2 +1,56 @@
fileFormatVersion: 2
guid: ffda049d4c0ac8944953e736728028af
guid: ffda049d4c0ac8944953e736728028af
PluginImporter:
externalObjects: {}
serializedVersion: 3
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
Any:
enabled: 0
settings:
Exclude Editor: 0
Exclude Linux64: 0
Exclude OSXUniversal: 0
Exclude WebGL: 1
Exclude Win: 0
Exclude Win64: 0
Exclude WindowsStoreApps: 0
Editor:
enabled: 1
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
Linux64:
enabled: 1
settings:
CPU: AnyCPU
OSXUniversal:
enabled: 1
settings:
CPU: AnyCPU
Win:
enabled: 1
settings:
CPU: AnyCPU
Win64:
enabled: 1
settings:
CPU: AnyCPU
WindowsStoreApps:
enabled: 1
settings:
CPU: AnyCPU
DontProcess: false
PlaceholderPath:
SDK: AnySDK
ScriptingBackend: AnyScriptingBackend
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,2 +1,56 @@
fileFormatVersion: 2
guid: 8fc9fb3fde8b09e40afdd6740a270db4
guid: 8fc9fb3fde8b09e40afdd6740a270db4
PluginImporter:
externalObjects: {}
serializedVersion: 3
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
Any:
enabled: 0
settings:
Exclude Editor: 0
Exclude Linux64: 0
Exclude OSXUniversal: 0
Exclude WebGL: 1
Exclude Win: 0
Exclude Win64: 0
Exclude WindowsStoreApps: 0
Editor:
enabled: 1
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
Linux64:
enabled: 1
settings:
CPU: AnyCPU
OSXUniversal:
enabled: 1
settings:
CPU: AnyCPU
Win:
enabled: 1
settings:
CPU: AnyCPU
Win64:
enabled: 1
settings:
CPU: AnyCPU
WindowsStoreApps:
enabled: 1
settings:
CPU: AnyCPU
DontProcess: false
PlaceholderPath:
SDK: AnySDK
ScriptingBackend: AnyScriptingBackend
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -12,21 +12,21 @@ PluginImporter:
validateReferences: 1
platformData:
Any:
enabled: 1
enabled: 0
settings:
Exclude Editor: 0
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude WebGL: 0
Exclude WebGL: 1
Exclude Win: 0
Exclude Win64: 0
Exclude WindowsStoreApps: 0
Exclude WindowsStoreApps: 1
Editor:
enabled: 1
settings:
CPU: x86_64
DefaultValueInitialized: true
OS: AnyOS
OS: Windows
Linux64:
enabled: 0
settings:
@@ -36,7 +36,7 @@ PluginImporter:
settings:
CPU: None
WebGL:
enabled: 1
enabled: 0
settings: {}
Win:
enabled: 1
@@ -47,7 +47,7 @@ PluginImporter:
settings:
CPU: x86_64
WindowsStoreApps:
enabled: 1
enabled: 0
settings:
CPU: X86
DontProcess: false

View File

@@ -1,3 +1,4 @@
#if !UNITY_WEBGL || UNITY_EDITOR
using log4net;
using log4net.Appender;
using log4net.Core;
@@ -10,7 +11,7 @@ using System;
using System.IO;
using UnityEngine;
namespace Assets.Scripts.UVC.Log
namespace UVC.Log
{
/// <summary>
/// xml 설정에서 AppData\LocalLow\Company Name\Product Name\ 접근 할 수 없어서 사용.
@@ -122,3 +123,4 @@ namespace Assets.Scripts.UVC.Log
}
}
#endif

View File

@@ -1,5 +1,5 @@
#nullable enable
#nullable enable
#if !UNITY_WEBGL || UNITY_EDITOR
using log4net.Appender;
using log4net.Core;
using SQLite4Unity3d;
@@ -177,3 +177,4 @@ namespace UVC.Log
}
}
}
#endif

View File

@@ -1,11 +1,12 @@
#nullable enable
#nullable enable
#if !UNITY_WEBGL || UNITY_EDITOR
using log4net;
using log4net.Appender;
using log4net.Core;
using log4net.Filter;
using log4net.Layout;
using log4net.Repository.Hierarchy;
#endif
using System;
using System.Diagnostics;
using System.IO;
@@ -15,12 +16,15 @@ namespace UVC.Log
{
public static class ULog
{
#if !UNITY_WEBGL || UNITY_EDITOR
private static readonly ILog logger = LogManager.GetLogger(typeof(ULog));
#endif
private static readonly bool useUnityDebug = true; // Unity Debug 사용 여부
static ULog()
{
#if !UNITY_WEBGL || UNITY_EDITOR
if (!useUnityDebug)
{
// unity runtime 일때
@@ -35,11 +39,13 @@ namespace UVC.Log
//FileConfigure();
}
}
#endif
}
public static void Debug(string msg)
{
#if !UNITY_WEBGL || UNITY_EDITOR
if (logger.IsDebugEnabled)
{
if (useUnityDebug)
@@ -57,10 +63,14 @@ namespace UVC.Log
logger.Debug(type.Name + "." + name + " [line " + lineNumber + "] " + msg);
}
}
#else
UnityEngine.Debug.Log(msg);
#endif
}
public static void Info(string msg)
{
#if !UNITY_WEBGL || UNITY_EDITOR
if (logger.IsInfoEnabled)
{
if (useUnityDebug)
@@ -78,11 +88,15 @@ namespace UVC.Log
logger.Info(type.Name + "." + name + " [line " + lineNumber + "] " + msg);
}
}
#else
UnityEngine.Debug.Log(msg);
#endif
}
public static void Warning(string msg, Exception? ex = null)
{
#if !UNITY_WEBGL || UNITY_EDITOR
if (logger.IsWarnEnabled)
{
if (useUnityDebug)
@@ -100,10 +114,14 @@ namespace UVC.Log
logger.Warn(type.Name + "." + name + " [line " + lineNumber + "] " + msg, ex);
}
}
#else
UnityEngine.Debug.LogWarning(msg);
#endif
}
public static void Error(string msg, Exception? ex = null)
{
#if !UNITY_WEBGL || UNITY_EDITOR
if (logger.IsErrorEnabled)
{
if (useUnityDebug)
@@ -121,10 +139,15 @@ namespace UVC.Log
logger.Error(type.Name + "." + name + " [line " + lineNumber + "] " + msg, ex);
}
}
#else
if (ex != null) UnityEngine.Debug.LogError($"{msg}\n{ex}");
else UnityEngine.Debug.LogError(msg);
#endif
}
public static void Fatal(string msg, Exception? ex = null)
{
#if !UNITY_WEBGL || UNITY_EDITOR
if (logger.IsFatalEnabled)
{
if (useUnityDebug)
@@ -142,9 +165,13 @@ namespace UVC.Log
logger.Fatal(type.Name + "." + name + " [line " + lineNumber + "] " + msg, ex);
}
}
#else
if (ex != null) UnityEngine.Debug.LogError($"{msg}\n{ex}");
else UnityEngine.Debug.LogError(msg);
#endif
}
#if !UNITY_WEBGL || UNITY_EDITOR
/// <summary>
/// log4net 파일 설정을 구성합니다.
/// Assets/Resources/log4net.editor.xml log4net.runtime.xml 파일로 구성하였기에 사용안함.
@@ -201,5 +228,6 @@ namespace UVC.Log
}
#endif
}
}