Giter Site home page Giter Site logo

jasonxudeveloper / jengine Goto Github PK

View Code? Open in Web Editor NEW
1.9K 40.0 324.0 99.99 MB

The solution that allows unity games to update in runtime. 使Unity开发的游戏支持热更新的解决方案。

Home Page: https://docs.xgamedev.net/

License: MIT License

C# 99.76% ShaderLab 0.24%
unity hotupdate csharp hot-update unity3d unity2d unity3d-plugin game ilruntime framework

jengine's Introduction

数据

人生

  • 编程
  • 数学
  • 动漫

jengine's People

Contributors

clksaaa avatar clyce avatar cxdtreeg avatar doomsdayer avatar huangkumao avatar i0gan avatar jasonxudeveloper avatar l-fone avatar senfee-cheng avatar tpxxn avatar zyowo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jengine's Issues

首包自带热更资源不成功

iOS,安卓和本地编辑器环境下均不成功.
iOS的问题是拷贝目录下没有res,且dlc中的其它文件全进去了.
安卓的问题是拷贝目录下(res和ver都有)似乎没有问题,但不成功.

自己封装一个dll 然后添加进热更工程, 热更后的工程访问不到这个类

System.Collections.Generic.KeyNotFoundException: Cannot find Type:ShiYuan.ArrayGenerator
at ILRuntime.Runtime.Enviorment.AppDomain.GetType (System.Object token, ILRuntime.CLR.TypeSystem.IType contextType, ILRuntime.CLR.Method.IMethod contextMethod) [0x00492] in <3772e70d8cdd4895b118b74ffcbb7471>:0
at ILRuntime.Runtime.Enviorment.AppDomain.GetMethod (System.Object token, ILRuntime.CLR.TypeSystem.ILType contextType, ILRuntime.CLR.Method.ILMethod contextMethod, System.Boolean& invalidToken) [0x00095] in <3772e70d8cdd4895b118b74ffcbb7471>:0
at ILRuntime.CLR.Method.ILMethod.InitToken (ILRuntime.Runtime.Intepreter.OpCodes.OpCode& code, System.Object token, System.Collections.Generic.Dictionary2[TKey,TValue] addr) [0x0028b] in <3772e70d8cdd4895b118b74ffcbb7471>:0 at ILRuntime.CLR.Method.ILMethod.InitCodeBody () [0x000e4] in <3772e70d8cdd4895b118b74ffcbb7471>:0 at ILRuntime.CLR.Method.ILMethod.get_Body () [0x00008] in <3772e70d8cdd4895b118b74ffcbb7471>:0 at ILRuntime.Runtime.Intepreter.ILIntepreter.Execute (ILRuntime.CLR.Method.ILMethod method, ILRuntime.Runtime.Stack.StackObject* esp, System.Boolean& unhandledException) [0x00000] in <3772e70d8cdd4895b118b74ffcbb7471>:0 at ILRuntime.Runtime.Intepreter.ILIntepreter.Run (ILRuntime.CLR.Method.ILMethod method, System.Object instance, System.Object[] p) [0x00069] in <3772e70d8cdd4895b118b74ffcbb7471>:0 at ILRuntime.Runtime.Enviorment.AppDomain.Invoke (ILRuntime.CLR.Method.IMethod m, System.Object instance, System.Object[] p) [0x00011] in <3772e70d8cdd4895b118b74ffcbb7471>:0 at IAsyncStateMachineClassInheritanceAdaptor+IAsyncStateMachineAdaptor.MoveNext () [0x00025] in <d06ab70e72cf4c9c91ef9bb7890bf785>:0 at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[TStateMachine] (TStateMachine& stateMachine) [0x0002c] in <437ba245d8404784b9fbab9b439ac908>:0 at ILRuntime.Runtime.Generated.System_Runtime_CompilerServices_AsyncVoidMethodBuilder_Binding.Start_1 (ILRuntime.Runtime.Intepreter.ILIntepreter __intp, ILRuntime.Runtime.Stack.StackObject* __esp, System.Collections.Generic.IList1[T] __mStack, ILRuntime.CLR.Method.CLRMethod __method, System.Boolean isNewObj) [0x00061] in :0
at (wrapper delegate-invoke) .invoke_StackObject*_ILIntepreter_StackObject*_IList1<object>_CLRMethod_bool(ILRuntime.Runtime.Intepreter.ILIntepreter,ILRuntime.Runtime.Stack.StackObject*,System.Collections.Generic.IList1,ILRuntime.CLR.Method.CLRMethod,bool)
at ILRuntime.Runtime.Intepreter.ILIntepreter.Execute (ILRuntime.CLR.Method.ILMethod method, ILRuntime.Runtime.Stack.StackObject* esp, System.Boolean& unhandledException) [0x02e32] in <3772e70d8cdd4895b118b74ffcbb7471>:0

使用Instantiate接口复制嵌套的gameObject问题

比如 a是父节点,b是子节点
1.如果a上没有使用classbind,b使用了classbind,复制后会报错,数组越界,即clrInstances和clrInstances4Ins的数组长度不一致(注意:如果这里复制的不是.prefab,而是场景上的gameObject对象,测试发现复制.prefab没有问题)
2.复制后生命周期问题Awake和OnEnable和Start方法调用的次数问题,这个和复制非嵌套的gameObject一样

构造不默认赋值

IType type = Init.appdomain.LoadedTypes[classType];
Type t = type.ReflectionType;//获取实际属性
var instance = _class.UseConstructor
? Init.appdomain.Instantiate(classType)
: new ILTypeInstance(type as ILType, false);

: new ILTypeInstance(type as ILType, false); 这个构造出来的对象不会默认赋值. 但Instantiate没问题.
举例:

{
   public List<string> list = new List<string>();

public a()
{
 debug.log(list.count)//null point
}
}

List<EnumType>在保存Json时出错

还有保存字典也出错.
原因是hotfix层的枚举类型被底层调用强制装换时抛出异常

if (! t_data.IsArray) {
                    list = (IList) Activator.CreateInstance (inst_type);
                    elem_type = t_data.ElementType;
                } else {
                    list = new ArrayList ();
                    elem_type = inst_type.GetElementType ();
                }

                while (true) {
                    object item = ReadValue (elem_type, reader);
                    if (item == null && reader.Token == JsonToken.ArrayEnd)
                        break;
                    var rt = elem_type is ILRuntime.Reflection.ILRuntimeWrapperType ? ((ILRuntime.Reflection.ILRuntimeWrapperType)elem_type).RealType : elem_type;
                   //-----我这里修复了一下,希望官方修复
                    if (elem_type is ILRuntime.Reflection.ILRuntimeType && ((ILRuntime.Reflection.ILRuntimeType)elem_type).ILType.IsEnum)
                    {
                        //item = Enum.Parse(pt, item.ToString(), true);
                        list.Add ((int)item);
                    }
                    else
                    {
                        item = rt.CheckCLRTypes(item);
                        list.Add (item);                        
                    }

                }

RepeatUntil 语法问题

        bool condition = false;
        JAction repeatWhenJ = new JAction();
        repeatWhenJ.RepeatUntil(() =>
        {
            Debug.Log("????");
        }, () => condition = false, 1)
        .ExecuteAsync(true);


        JAction delayJ = new JAction();
        delayJ.Do(() => Debug.Log("JAction 在执行!用了延时Delay"))
            .Delay(3)
            .Do(() => Debug.Log("延时了3秒钟??????????"))
            .Do(() => condition = false)
            .Execute();

不知道为什么上面代码 condition变成false 但是循环还在继续跑

GetComponent方法的bug

例如:同一个gameObject下面使用classbind绑定TestA,TestB,TestC

public class TestA : MonoBehaviour{}
public class TestB : MonoBehaviour{}
public class TestC : MonoBehaviour
{
    void Start()
    {
        Debug.LogError(GetComponent<TestA>());
        Debug.LogError(GetComponent<TestB>());
        Debug.LogError(GetComponent<TestC>());
    }
}

这三句GetComponent获取到的结果全是TestA对象

关于ClassBind的一个导致Unity运行崩溃的bug

有A,B两个热更脚本, 均通过ClassBind绑定在场景GameObject上面
A脚本有个gameobject变量 通过ClassBind引用了B的gameobject
在A脚本Awake方法里使用 Object.Instantiate(B的gameobj, 会导致Unity编辑器直接崩溃
如果在Start方法里使用 那么就没有问题.

使用Component.GetComponent的问题

例如:

public class Test2: MonoBehaviour{}
public class Test : Test2
{
    void Start()
    {
        Debug.LogError(GetComponent<Image>());
    }
}

获取不到Image组件,并报错
NullReferenceException: Object reference not set to an instance of an object
JEngine.Helper.RegisterCLRMethodRedirectionHelper.GetComponent (ILRuntime.Runtime.Intepreter.ILIntepreter __intp, ILRuntime.Runtime.Stack.StackObject* __esp, System.Collections.Generic.IList`1[T] __mStack, ILRuntime.CLR.Method.CLRMethod __method, System.Boolean isNewObj) (at Assets/Scripts/Helpers/RegisterCLRMethodRedirctionHelper.cs:1039)
ILRuntime.Runtime.Intepreter.ILIntepreter.Execute (ILRuntime.CLR.Method.ILMethod method, ILRuntime.Runtime.Stack.StackObject* esp, System.Boolean& unhandledException) (at Assets/Dependencies/ILRuntime/ILRuntime/Runtime/Intepreter/ILIntepreter.cs:1823)
Rethrow as ILRuntimeException: Object reference not set to an instance of an object
IL_0024: call !!0 UnityEngine.Component::GetComponent<UnityEngine.UI.Image>()
Tests.Start() HotUpdateScripts/Project/Tests.cs:Line 85

使用GetComponent方法,生命周期方法调用顺序不对

例如:

public GameObject testObj;
    private void Awake()
    {
        testObj.GetComponent<Test2>().TestApi();
    }

testObj使用classbind绑定了Test2,这里执行结果为先调用TestApi,再调用Test2的Awake方法
正确的执行顺序应该是TestApi在Test2的Awake和OnEnable方法并且在Test2的Start的方法之前调用

List<T> add错误

使用 class A : JBehavior, IMyInterface ,B : MyClass,IMyInterface 时候
`List<\IMyInterface > list = new List<\IMyInterface >();

list.Add(a);//error

list.Add(b);

IL_0053: callvirt System.Void System.Collections.Generic.List1<>::Add(!0)

应该是用了适配器引起的继承关系问题.

使用classbind绑定的类节点未激活的情况下的问题

1.父节点未激活,子节点激活,但是子节点的Awake被调用,使用activeInHierarchy即可解决
2.当未激活的节点一直未激活,退出运行时报错,错误信息如下:

MissingReferenceException: The object of type 'Adaptor' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
MonoBehaviourAdapter+Adaptor+<Awake>d__18.MoveNext () (at Assets/Dependencies/ILRuntime/Adapters/MonoBehaviourAdapter.cs:95)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <437ba245d8404784b9fbab9b439ac908>:0)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) (at <437ba245d8404784b9fbab9b439ac908>:0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at <23a7799da2e941b88c6db790c607d655>:0)
UnityEngine.UnitySynchronizationContext:ExecuteTasks()

Json 读取错误,不支持字典枚举key

建议修改代码为

else if (reader.Token == JsonToken.ObjectStart) {
                AddObjectMetadata (value_type);
                ObjectMetadata t_data = object_metadata[value_type];
                if (value_type is ILRuntime.Reflection.ILRuntimeType)
                    instance = ((ILRuntime.Reflection.ILRuntimeType)value_type).ILType.Instantiate();
                else
                    instance = Activator.CreateInstance(value_type);
                bool isIntKey = t_data.IsDictionary && value_type.GetGenericArguments()[0] == typeof(int); 
                while (true) {
                    reader.Read ();

                    if (reader.Token == JsonToken.ObjectEnd)
                        break;

                    string key = (string) reader.Value;

                    if (t_data.Properties.ContainsKey (key)) {
                        PropertyMetadata prop_data =
                            t_data.Properties[key];

                        if (prop_data.IsField) {
                            ((FieldInfo) prop_data.Info).SetValue (
                                instance, ReadValue (prop_data.Type, reader));
                        } else {
                            PropertyInfo p_info =
                                (PropertyInfo) prop_data.Info;

                            if (p_info.CanWrite)
                                p_info.SetValue (
                                    instance,
                                    ReadValue (prop_data.Type, reader),
                                    null);
                            else
                                ReadValue (prop_data.Type, reader);
                        }

                    } else {
                        if (! t_data.IsDictionary) {

                            if (! reader.SkipNonMembers) {
                                throw new JsonException (String.Format (
                                        "The type {0} doesn't have the " +
                                        "property '{1}'",
                                        inst_type, key));
                            } else {
                                ReadSkip (reader);
                                continue;
                            }
                        }

                        var dict = ((IDictionary) instance);
                        var elem_type = t_data.ElementType;
                        object readValue = ReadValue (elem_type, reader);
                        var rt = t_data.ElementType is ILRuntime.Reflection.ILRuntimeWrapperType
                            ? ((ILRuntime.Reflection.ILRuntimeWrapperType) t_data.ElementType).RealType
                            : t_data.ElementType;
                        //value 是枚举的情况没处理,毕竟少
                        if (isIntKey)
                        {
                            var dictValueType = value_type.GetGenericArguments()[1];
                            IConvertible convertible = dictValueType as IConvertible;
                            if (convertible == null)
                            {
                                //自定义类型扩展
                                if (dictValueType == typeof(double))//CheckCLRTypes() 没有double,也可以修改ilruntime源码实现
                                {
                                    var v = Convert.ChangeType(readValue.ToString(),dictValueType);
                                    dict.Add(Convert.ToInt32(key),v);
                                }
                                else
                                {
                                    readValue = rt.CheckCLRTypes(readValue);  
                                    dict.Add(Convert.ToInt32(key),readValue);
                                   // throw new JsonException (String.Format("The type {0} doesn't not support",dictValueType));
                                }
                            }
                            else
                            {
                                var v = Convert.ChangeType(readValue, dictValueType);
                                dict.Add(Convert.ToInt32(key),v);
                            }
                        }
                        else
                        {
                            readValue = rt.CheckCLRTypes(readValue);  
                            dict.Add(key,readValue);
                        }
                    }

                }

生命周期顺序问题.

研读代码发现生命周期顺序可能被改变:

     if (_class.ActiveAfter)
            {
                if (_class.BoundData == false && _class.RequireBindFields)
                {
                    Log.PrintError($"自动绑定{this.name}出错:{classType}没有成功绑定数据,无法自动激活,请手动!");
                    return null;
                }

                clrInstance.enabled = true;<----这里
                clrInstance.Awake();
            }```

unity生命周期应该为:
如果addComponent前,gameobject.active == true时
Awake
OnEnable
OnStart
Update

如果addComponent前,gameobject.active == false时
什么也不做.

同时应该判断 
 if (_class.ActiveAfter && gameobject.active)
{
clrInstance.Awake();
 clrInstance.enabled = true;<---但未证实会不会多次调用.
}






自动获取fields时出现的问题

在脚本中删除之前已绑定的对象后,删除Bind面板的对象,然后点击自动获取fields仍然会被再次获取到,相关Fields无法被正确更新。保存或编译都没用,只能是在unity中先run一波游戏之后,相关的新Bind状态才会被更新(删掉的绑定对象才不会被自动获取到)。

在运行状态于classBind中点选自动获取Fields出错

RT,此时控制台报错如下:
InvalidOperationException: This cannot be used during play mode.
UnityEditor.SceneManagement.EditorSceneManager.SaveSceneInternal (UnityEngine.SceneManagement.Scene scene, System.String dstScenePath, System.Boolean saveAsCopy) (at <1fe7a3c0284a456b9681b7a93141c89a>:0)
UnityEditor.SceneManagement.EditorSceneManager.SaveScene (UnityEngine.SceneManagement.Scene scene, System.String dstScenePath, System.Boolean saveAsCopy) (at <1fe7a3c0284a456b9681b7a93141c89a>:0)
UnityEditor.SceneManagement.EditorSceneManager.SaveScene (UnityEngine.SceneManagement.Scene scene, System.String dstScenePath) (at <1fe7a3c0284a456b9681b7a93141c89a>:0)
JEngine.Editor.ClassBindEditor+d__4.MoveNext () (at Assets/Dependencies/JEngine/Editor/JEngineTools/ClassBindEditor.cs:243)

此时进度条还无法关闭,只能重新编译或重启unity解决。

可在执行前添加逻辑判断:
if (Application.isPlaying)
{
EditorUtility.DisplayDialog("ClassBind Error", "This cannot be used during play mode", "OK");
return;
}
以此避免

关于Class Bind的绑定问题

可以绑定脚本的基类中的私有枚举类型字段吗(基类和枚举类型也在HotUpdateScripts项目中定义)?

使用Instantiate接口复制非嵌套的gameObject问题

public class Test3 : MonoBehaviour
{
    private void Awake()
    {
        Log.PrintError("===Awake==>"+gameObject.name);
    }
    void Start()
    {
        Debug.LogError("===>Start==>" + gameObject.name);
    }
    void OnEnable()
    {
        Debug.LogError("===>OnEnable==>" + gameObject.name);
    }
}
1.复制一次时
//测试类
public class Tests : MonoBehaviour
{
    public GameObject testObj;
    void Start()
    {
        Instantiate(testObj);
    }
}
testObj是使用classbind挂了Test3类,复制后的Test3(Clone)的Awake和OnEnable未执行

2.复制两次时
//测试类
public class Tests : MonoBehaviour
{
    public GameObject testObj;
    void Start()
    {
        Instantiate(testObj);
        Instantiate(testObj);
    }
}
testObj是使用classbind挂了Test3类,复制后的Test3(Clone)的Awake和OnEnable只有其中一个执行了,而Test3(Clone)的Start方法多执行了一次

3.复制多次 ...

关于热更的一个疑问

请问如果要将热更的内容加入首包现在是否支持? 就是第一次发包玩家不需要进行大量更新, 将现在生成的DLC目录放到安装包里, 后续可以通过热更更新内容.

点击UIDemo报错

[JEngine Error] UI Root Loop failed: JEngine不支持这种Instantiate, IL_002f: call UnityEngine.Object.....

编辑器运行正常,打包后运行,出现空引用报错

RT,但貌似功能都没影响。

重现步骤:
Touch To Start-UI Demo 即会出现十多个空引用报错。

内容为两种:

![Exception]->NullReferenceException
->MonoBehaviourAdapter+Adaptor+d__19.MoveNext () (at :0)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <9577ac7a62ef43179789031239ba8798>:0)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__6_0 (System.Object state) (at ><9577ac7a62ef43179789031239ba8798>:0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at :0)
UnityEngine.UnitySynchronizationContext:ExecuteTasks()


![Exception]->NullReferenceException
->ProjectAdapter.ExampleAPIAdapter+Adapter+d__13.MoveNext () (at :0)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <9577ac7a62ef43179789031239ba8798>:0)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__6_0 (System.Object state) (at ><9577ac7a62ef43179789031239ba8798>:0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at :0)
UnityEngine.UnitySynchronizationContext:ExecuteTasks()

报错出现在“初始化 UIRootView成功”Log之前。

是否跟此issue有关联呢?
Ourpalm/ILRuntime#246

List<T> add 类型装换错误

IMonster为底层框架层接口时并且进行了CrossBinding
为什么这样用?
因为ilruntime计算实在慢,我的游戏PC上只有2帧,打算把物理fixedupdate()里的逻辑放到底层处理完成结果后通过接口IMonster返回,

//-----unity层开始
public interface IMonster
{
}

static class MonsterSelector
{
底层复杂的计算,选择周围敌人  
    public static  List<IMonster> GetAroundMonster(List<IMonster> list)
    {
      return new List<IMonster>(list);
     }
}
//-----unity层结束
//-----hot层
class A : Monster, IMonster, IPoolable,IJsonData, IUnitStatModifier,IEngineObjectPool,
{}

class MonsterAi
{
 void FixedUpdate()
 {
  List<Monster> notInterfaceList = AllMonsterList;
  List<IMonster> list = List<IMonster>();

  for(...)
  {
    list.Add(aroundMonsterList[i]);;//error
  }
  List<IMonster> aroundMonsterList = MonsterSelector.GetAroundMonster(list);//list打算在这里用.
}

应该是用了适配器引起的继承关系问题.

2个Class Bind的问题

001
002

Unity 2020.3.3
原始工程打开
点 自动获取fields 第一个错
点 自动获取type 第二个错 - 做成prefab的情况下

Instantiate创建Prefab时报错

Instantiate创建Prefab时报错
IndexOutOfRangeException: Index was outside the bounds of the array.
JEngine.Helper.RegisterCLRMethodRedirectionHelper.Instantiate

提个UI框架的小建议

APanelBase
public bool IsPlayOpenSound = true;
public bool IsPlayCloseSound = true;
public bool IsPlayButtonSound = true;
public bool isFilm = false;
public bool m_IsKeepOpen = false;
public bool m_IsLoadFromResources = false;
public bool m_IsAlwaysOpen = false;
public bool NeedAnchor = false;//刘海屏幕适配
public UIPanelType m_Type = UIPanelType.Two;

    public string m_strPanelViewName = null;
    public GameObject m_gameobj = null;
    public RectTransform Trans = null;
    public Action<APanelBase> OnCloseEvent = null;
    public Action<APanelBase> OnOpenEvent = null;
    public static Vector3 HidePos = Vector3.left * 10000.0f;
    private Vector3 _srcLocalPos;

    public bool m_IsAffectMusic = false;//是否影响声音
    public bool m_IsResetMusic = false;//是否还原声音

这里面很多值没有使用, 也没有注释, demo里面也没有用到, 希望能通过或者注释说明一下,

UIMgr
里面提供的接口跟参数也没有注释跟使用说明,
eg: public void ShowUI(string uibaseName, bool isSaveShow = false,
isSaveShow 是什么含义?

GetPlatformForAssetBundles 这个函数的问题

我感觉应该改成这样, 现在的宏定义会导致发包以后找不到路径, 宏定义外面少了return null

    private static string GetPlatformForAssetBundles(RuntimePlatform target)
    {

#if UNITY_EDITOR
var t = EditorUserBuildSettings.activeBuildTarget;
switch (t)
{
case BuildTarget.Android:
return "Android";
case BuildTarget.iOS:
return "iOS";
case BuildTarget.WebGL:
return "WebGL";
case BuildTarget.StandaloneWindows:
case BuildTarget.StandaloneWindows64:
return "Windows";
case BuildTarget.StandaloneOSX:
return "OSX";
}
#else
switch (target)
{
case RuntimePlatform.OSXEditor:
case RuntimePlatform.OSXPlayer:
return "OSX";
case RuntimePlatform.WindowsPlayer:
case RuntimePlatform.WindowsEditor:
return "Windows";
case RuntimePlatform.IPhonePlayer:
return "iOS";
case RuntimePlatform.Android:
return "Android";
default:
return null;
}
#endif
return null;

DLC上传远程服务器更新后每次都会报一个错

代码是git上的代码
2021412-114849
EndOfStreamException: Unable to read beyond the end of the stream.
System.IO.BinaryReader.FillBuffer (System.Int32 numBytes) (at <9577ac7a62ef43179789031239ba8798>:0)
System.IO.BinaryReader.ReadInt32 () (at <9577ac7a62ef43179789031239ba8798>:0)
libx.Versions.LoadVersion (System.String filename) (at Assets/Dependencies/XAsset/Runtime/Core/Versions.cs:122)
UnityEngine.Debug:LogException(Exception)
libx.Versions:LoadVersion(String) (at Assets/Dependencies/XAsset/Runtime/Core/Versions.cs:130)
libx.d__34:MoveNext() (at Assets/Dependencies/XAsset/Runtime/Core/Updater.cs:474)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.