CsvHelper
is good tool in the planet.
But, install for Unity is quite inconvenience.
I unzuped .nupkg
and get dll
file.
I hope it release for Unity Asset Store or just download link.
I'll look into it. I haven't done it before, so I'm not sure what I'm getting into here. :)
Are you familiar with how to create a unity asset for the store?
I just submitted it to the asset store. We'll see if it gets approved.
perhaps an alternative is https://github.com/GlitchEnzo/NuGetForUnity ?
That looks awesome. Unity rejected the asset store request because they didn't think the documentation was good enough. Having every library in NuGet have to submit their own asset to the store seems silly. This is a much better way to do things.
If someone can verify this works, I'll update the documentation to point Unity people to this.
Hi @JoshClose ! :)
I tested CSVHelper from NuGetForUnity, I got some issues on iOS build:
NullReferenceException: Object reference not set to an instance of an object.
Managed Stack Trace:
System.Linq.Expressions.Interpreter.LightLambda.MakeRunDelegateCtor (System.Type delegateType) (at <00000000000000000000000000000000>:0)
System.Linq.Expressions.Interpreter.LightLambda.GetRunDelegateCtor (System.Type delegateType) (at <00000000000000000000000000000000>:0)
System.Linq.Expressions.Interpreter.LightLambda.MakeDelegate (System.Type delegateType) (at <00000000000000000000000000000000>:0)
System.Linq.Expressions.Expression`1[TDelegate].Compile (System.Boolean preferInterpretation) (at <00000000000000000000000000000000>:0)
CsvHelper.ObjectCreator.GetFunc (System.Type type, System.Object[] args) (at <00000000000000000000000000000000>:0)
CsvHelper.ObjectCreator.CreateInstance (System.Type type, System.Object[] args) (at <00000000000000000000000000000000>:0)
CsvHelper.ObjectCreator.CreateInstance (System.Type type, System.Object[] args) (at <00000000000000000000000000000000>:0)
CsvHelper.ObjectResolver+<>c__DisplayClass17_0.<.cctor>b__1 (System.Type type, System.Object[] args) (at <00000000000000000000000000000000>:0)
System.Func`3[T1,T2,TResult].Invoke (T1 arg1, T2 arg2) (at <00000000000000000000000000000000>:0)
CsvHelper.ObjectResolver.Resolve[T] (System.Object[] constructorArgs) (at <00000000000000000000000000000000>:0)
CsvHelper.Configuration.CsvConfiguration.RegisterClassMap[TMap] () (at <00000000000000000000000000000000>:0)
Com.Atomicorn.TestCSVHelper..ctor () (at <00000000000000000000000000000000>:0)
System.Threading.ContextCallback.Invoke (System.Object state) (at <00000000000000000000000000000000>:0)
System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <00000000000000000000000000000000>:0)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () (at <00000000000000000000000000000000>:0)
System.Action.Invoke () (at <00000000000000000000000000000000>:0)
System.Threading.ContextCallback.Invoke (System.Object state) (at <00000000000000000000000000000000>:0)
System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) (at <00000000000000000000000000000000>:0)
System.Threading.Tasks.Task.FinishContinuations () (at <00000000000000000000000000000000>:0)
System.Threading.Tasks.Task`1[TResult].TrySetResult (TResult result) (at <00000000000000000000000000000000>:0)
System.Threading.Tasks.TaskCompletionSource`1[TResult].TrySetResult (TResult result) (at <00000000000000000000000000000000>:0)
Com.Atomicorn.Common.Utils.Unity.Server.Request+<RequestCoroutine>d__32.MoveNext () (at <00000000000000000000000000000000>:0)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <00000000000000000000000000000000>:0)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <00000000000000000000000000000000>:0)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) (at <00000000000000000000000000000000>:0)
System.Threading.SendOrPostCallback.Invoke (System.Object state) (at <00000000000000000000000000000000>:0)
UnityEngine.UnitySynchronizationContext.Exec () (at <00000000000000000000000000000000>:0)
UnityEngine.UnitySynchronizationContext.Exec () (at <00000000000000000000000000000000>:0)
UnityEngine.UnitySynchronizationContext:Exec()
Android build, same kind:
2021/01/05 19:48:55.950 23262 23294 Error Unity NullReferenceException: Object reference not set to an instance of an object.
2021/01/05 19:48:55.950 23262 23294 Error Unity at System.Linq.Expressions.Interpreter.LightLambda.MakeRunDelegateCtor (System.Type delegateType) [0x00000] in <00000000000000000000000000000000>:0
2021/01/05 19:48:55.950 23262 23294 Error Unity at System.Linq.Expressions.Interpreter.LightLambda.GetRunDelegateCtor (System.Type delegateType) [0x00000] in <00000000000000000000000000000000>:0
2021/01/05 19:48:55.950 23262 23294 Error Unity at System.Linq.Expressions.Interpreter.LightLambda.MakeDelegate (System.Type delegateType) [0x00000] in <00000000000000000000000000000000>:0
2021/01/05 19:48:55.950 23262 23294 Error Unity at System.Linq.Expressions.Expression`1[TDelegate].Compile (System.Boolean preferInterpretation) [0x00000] in <00000000000000000000000000000000>:0
2021/01/05 19:48:55.950 23262 23294 Error Unity at CsvHelper.TypeConversion.SByteConverter..ctor () [0x00000] in <00000000000000000000000000000000>:0
2021/01/05 19:48:55.950 23262 23294 Error Unity at CsvHelper.TypeConversion.SByteConverter..ctor () [0x00000] in <00000000000000000000000000000000>:0
2021/01/05 19:48:55.950 23262 23294 Error Unity at CsvHelper.ObjectCreator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in <00000000000000000000000000000000>:0
2021/01/05 19:48:55.950 23262 23294 Error Unity at
Unity version: 2019.3.7f1
CSVHelper version: 19.0.0
Most helpful comment
That looks awesome. Unity rejected the asset store request because they didn't think the documentation was good enough. Having every library in NuGet have to submit their own asset to the store seems silly. This is a much better way to do things.
If someone can verify this works, I'll update the documentation to point Unity people to this.