Skip to content

Commit

Permalink
v2.4.5
Browse files Browse the repository at this point in the history
Added Loxodon.Framework.OSA
  • Loading branch information
Clark committed Aug 29, 2022
1 parent 6248512 commit 02e1ad0
Show file tree
Hide file tree
Showing 102 changed files with 13,773 additions and 138 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.vovgou.loxodon-framework-addressable",
"displayName": "Loxodon Framework Addressable",
"version": "2.4.3",
"version": "2.4.5",
"unity": "2018.4",
"description": "This is a plugin that uses Unity's addressable asset system to load resources.",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.vovgou.loxodon-framework-connection",
"displayName": "Loxodon Framework Connection",
"version": "2.4.3",
"version": "2.4.5",
"unity": "2018.4",
"description": "This is a network component, using TCP protocol to connect to the server by default.",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.vovgou.loxodon-framework-fgui",
"displayName": "Loxodon Framework FairyGUI",
"version": "2.4.3",
"version": "2.4.5",
"unity": "2018.4",
"description": "",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,34 +26,39 @@
using System.IO;
using System.Xml.Linq;
using UnityEditor;
using UnityEditor.Build;
using UnityEditor.Build.Reporting;
using UnityEditor.Callbacks;
using UnityEngine;

namespace Loxodon.Framework.Fody.Editos
{
public static class FodyWeavingPostprocessor
public class FodyWeavingPostprocessor : IPostBuildPlayerScriptDLLs
{
private const string CONFIG_PATH_DIR = "Assets/LoxodonFramework/Editor/AppData/Fody/";
private const string CONFIG_PATH = CONFIG_PATH_DIR + "FodyWeavers.xml";
private const string DEFAULT_CONFIG_DIR = "Assets/LoxodonFramework/Fody/Plugins/Editor/";
private const string DEFAULT_CONFIG_PACKAGES_DIR = "Packages/com.vovgou.loxodon-framework-fody/Plugins/Editor/";
private const string DEFAULT_CONFIG_TEMPLATE_NAME = "FodyWeavers.template.xml";
private const string ASSEMBLIES_ROOT_PATH = @"Library\ScriptAssemblies\";
private const string ASSEMBLIES_EDITOR_LIB_PATH = "Library/ScriptAssemblies/";
private const string ASSEMBLIES_BUILD_TEMP_PATH = "Temp/StagingArea/Data/Managed/";
private const string DEFAULT_ASSEMBLIE_FILENAME = "Assembly-CSharp";
private const string ASSEMBLIE_FILENAME_SUFFIX = ".dll";

public int callbackOrder => 0;

[DidReloadScripts]
public static void OnScriptsReloaded()
{
DoWeave();
DoWeave(ASSEMBLIES_EDITOR_LIB_PATH);
}

[PostProcessBuild]
public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject)
public void OnPostBuildPlayerScriptDLLs(BuildReport report)
{
DoWeave();
DoWeave(ASSEMBLIES_BUILD_TEMP_PATH);
}

private static void DoWeave()
private static void DoWeave(string assembliesPath = null)
{
if (!File.Exists(CONFIG_PATH))
{
Expand Down Expand Up @@ -89,6 +94,7 @@ private static void DoWeave()
if (assemblyNames.Count <= 0)
assemblyNames.Add(DEFAULT_ASSEMBLIE_FILENAME);

string assembliesRoot = string.IsNullOrEmpty(assembliesPath) ? ASSEMBLIES_EDITOR_LIB_PATH : assembliesPath;
string weaverAssemblyRoot = DEFAULT_CONFIG_PACKAGES_DIR;
if (Directory.Exists(DEFAULT_CONFIG_PACKAGES_DIR))
weaverAssemblyRoot = DEFAULT_CONFIG_PACKAGES_DIR;
Expand All @@ -97,7 +103,7 @@ private static void DoWeave()

foreach (string name in assemblyNames)
{
string assemblyFilePath = ASSEMBLIES_ROOT_PATH + name;
string assemblyFilePath = assembliesRoot + name;
if (!assemblyFilePath.EndsWith(ASSEMBLIE_FILENAME_SUFFIX, System.StringComparison.OrdinalIgnoreCase))
assemblyFilePath += ASSEMBLIE_FILENAME_SUFFIX;

Expand All @@ -109,5 +115,24 @@ private static void DoWeave()
Debug.LogFormat("Weaving code succeeded for {0}.dll", name);
}
}

//private static string GetAssembliesRoot(XElement assemblyNamesNode)
//{
// if (assemblyNamesNode == null)
// return ASSEMBLIES_EDITOR_LIB_PATH;

// var attr = assemblyNamesNode.Attribute(XName.Get("root"));
// if (attr == null || string.IsNullOrEmpty(attr.Value))
// return ASSEMBLIES_EDITOR_LIB_PATH;

// string root = attr.Value.Trim();
// if (string.IsNullOrEmpty(root))
// return ASSEMBLIES_EDITOR_LIB_PATH;

// root = root.Replace(@"\", "/");
// if (!root.EndsWith("/"))
// return root + "/";
// return root;
//}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.vovgou.loxodon-framework-fody",
"displayName": "Loxodon Framework Fody",
"version": "2.4.4",
"version": "2.4.5",
"unity": "2018.4",
"description": "This is a plugin for static weaving code that integrates PropertyChanged.Fody into a Unity project, it can inject code which raises the PropertyChanged event into property setters of classes which implement INotifyPropertyChanged.",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.vovgou.loxodon-framework-ilruntime",
"displayName": "Loxodon Framework ILRuntime",
"version": "2.4.3",
"version": "2.4.5",
"unity": "2018.4",
"description": "ILRuntime",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.vovgou.loxodon-framework-localization-csv",
"displayName": "Loxodon Framework Localization CSV",
"version": "2.4.3",
"version": "2.4.5",
"unity": "2018.4",
"description": "This is a plugin for the Loxodon.Framework, which supports reading localized resources from csv files.",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.vovgou.loxodon-framework-log4net",
"displayName": "Loxodon Framework Log4Net",
"version": "2.4.3",
"version": "2.4.5",
"unity": "2018.4",
"description": "This is a plugin for the logging feature of Loxodon.Framework, which helps you use Log4Net in your Unity project.",
"license": "MIT",
Expand Down
8 changes: 8 additions & 0 deletions Loxodon.Framework.OSA/Assets/LoxodonFramework.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Loxodon.Framework.OSA/Assets/LoxodonFramework/OSA.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Changelog

Requires Unity 2018.4 or higher.

## [2.0.0] - 2020-07-02
### This is the first release of *Loxodon.Framework.OSA*

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions Loxodon.Framework.OSA/Assets/LoxodonFramework/OSA/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 Clark Yang

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 02e1ad0

Please sign in to comment.