Commit c141e353 authored by gaorui's avatar gaorui
Browse files

Merge branch 'feat-dev3' into 'main'

Feat dev3

See merge request unity-cross/UnityDemo!1
parents 2ce8d1c7 b31b4ba9
fileFormatVersion: 2
guid: e0aa63e0b228a4038a86c7b4b1f8cbbe
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
/// <summary>
/// 原生日志记录器。
/// 该类直接调用 Android 或 iOS 的系统级日志API,可以绕过 Unity 的 Debug.Log 剥离机制。
/// 这意味着即使在 Release Build (非 Development Build) 中,日志也能被输出到 Logcat (Android) 或 Console (iOS)。
/// </summary>
public static class NativeLogger
{
#if UNITY_ANDROID && !UNITY_EDITOR
// 为 Android 平台缓存 Java Log Class,避免重复查找
private static readonly AndroidJavaClass _logClass = new AndroidJavaClass("android.util.Log");
#endif
/// <summary>
/// 打印一条信息级别的日志。
/// </summary>
/// <param name="tag">Logcat 中显示的标签</param>
/// <param name="message">日志内容</param>
public static void I(string tag, object message)
{
Debug.Log($"[{tag}] {message}");
#if UNITY_EDITOR
// 在编辑器中,我们仍然使用 Debug.Log,因为它功能更丰富(例如可以点击跳转)
Debug.Log($"[{tag}] {message}");
#elif UNITY_ANDROID
// 在 Android 设备上,直接调用 android.util.Log.i(tag, message)
_logClass.CallStatic<int>("i", tag, message.ToString());
#elif UNITY_IOS
// 在 iOS 设备上,调用自定义的 NSLog 封装
// (需要在 Xcode 项目中添加一个 .mm 文件来实现 _logToConsole)
// _logToConsole($"[I] [{tag}] {message}");
#endif
}
/// <summary>
/// 打印一条警告级别的日志。
/// </summary>
/// <param name="tag">Logcat 中显示的标签</param>
/// <param name="message">日志内容</param>
public static void W(string tag, object message)
{
#if UNITY_EDITOR
Debug.LogWarning($"[{tag}] {message}");
#elif UNITY_ANDROID
_logClass.CallStatic<int>("w", tag, message.ToString());
#elif UNITY_IOS
// _logToConsole($"[W] [{tag}] {message}");
#endif
}
/// <summary>
/// 打印一条错误级别的日志。
/// </summary>
/// <param name="tag">Logcat 中显示的标签</param>
/// <param name="message">日志内容</param>
public static void E(string tag, object message)
{
#if UNITY_EDITOR
Debug.LogError($"[{tag}] {message}");
#elif UNITY_ANDROID
_logClass.CallStatic<int>("e", tag, message.ToString());
#elif UNITY_IOS
// _logToConsole($"[E] [{tag}] {message}");
#endif
}
}
fileFormatVersion: 2
guid: 5505e8ead4d664b11bcd90828bfdc47f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 3494f939baf0a459d9d444c9e3f1809d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
BfgKS3WzGCqGBX6PJvlPvckHPWOL+wMba+sbFDeMcfUobwqt5wqyDzPEELejk0iGqTTQK/4sv2ouexn5a68SekHCeS4FV3QT9I3mooXqQI4b3SPvCX7+JZVNT0neW94oW605rR1zu/zZWcdxrZ8GGGbJMq6j2Wq4Os5nyJJlWoVy9Teli0sXe9G/7bZ9GPBKTZKJ4ChifZUf6fnYzb6XuBTjswGpkvDKXfx8kKjwNPWRj/+K0wWUlDSe+9xi3NPIB3Pq/5MQjFxZbe3H3hZbQIjLkWFELuz26aZvzr0to6MIrfKAAngOOaxY5lqKkqGsoXFptqiVV88nuKAwnytpazOB63W5UAGaeN9SoE5SFsLGzqo/+gS+oM0ZP+mEUi36vTVWJPrYf/dwApmTSVg98YIagzeGzfjliKUbMdya2DVRPgZVFnsjRuAg/C/qaVzr1eGFRfLhb7CbbjhytdBNRe0Oo10DbNIbqgltGZ0/0EM/4DWzjojE3axX/3xP1sZ9BA7K9sxH4KxeCPOIndUht3tnvgXYJchvUi1hyh4wMUhLUdZwvbKCJ8K+aQbFyJUToLlLaIkhtaFMcKLF2DrfxmPW+i7bmSbb43wFGSgKlO/LQK6cxlPG8I6plysz91D9QrUDSdHSrp/yxORn9nVTXyLfqktY/zpoucpa4dpkE5A=
\ No newline at end of file
fileFormatVersion: 2
guid: ff9cdea1ecf474317aae295623180958
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: f54d1bd14bd3ca042bd867b519fee8cc
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 8e7e8f5a82a3a134e91c54efd2274ea9
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 1b8d251f9af63b746bf2f7ffe00ebb9b
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: ce51c8e33b734b4db6086586558c53a3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: b63e0053080646b9819789bf3bf9fa17
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Copyright (c) 2011, Vernon Adams (vern@newtypography.co.uk),
with Reserved Font Name Anton.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
fileFormatVersion: 2
guid: 73a79399807f4e8388c2cbb5494681ca
timeCreated: 1484172033
licenseType: Pro
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 997a43b767814dd0a7642ec9b78cba41
timeCreated: 1484172033
licenseType: Pro
TrueTypeFontImporter:
serializedVersion: 2
fontSize: 16
forceTextureCase: -2
characterSpacing: 1
characterPadding: 0
includeFontData: 1
use2xBehaviour: 0
fontNames: []
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
userData:
assetBundleName:
assetBundleVariant:
Copyright (c) 2010 by vernon adams (vern@newtypography.co.uk),
with Reserved Font Name Bangers.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
fileFormatVersion: 2
guid: efe0bf4ac872451e91612d1ae593f480
timeCreated: 1484171296
licenseType: Pro
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 5dd49b3eacc540408c98eee0de38e0f1
timeCreated: 1484171297
licenseType: Pro
TrueTypeFontImporter:
serializedVersion: 2
fontSize: 16
forceTextureCase: -2
characterSpacing: 1
characterPadding: 0
includeFontData: 1
use2xBehaviour: 0
fontNames: []
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
userData:
assetBundleName:
assetBundleVariant:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment