My project is a no-go for Flash output. I submitted a bug for it, but just to put this out there... when I build, it apparently fails while trying to generate some ActionScript. Unfortunately the error reporting doesn't give any information on what script (much less where in that script) it is having an issue: Code (csharp): Failed to convert type Ext: Mono.Cecil.ResolutionException: Failed to resolve T at cil2as.Extensions.ResolutionExtensions.Resolve[TypeReference,TypeDefinition] (Mono.Cecil.TypeReference reference, System.Func`2 resolve) [0x00000] in <filename unknown>:0 at cil2as.Extensions.ResolutionExtensions.CheckedResolve (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0 at cil2as.Extensions.TypeReferenceExtensions.IsAssignableTo (Mono.Cecil.TypeReference typeRef, System.String typeName) [0x00000] in <filename unknown>:0 at cil2as.Extensions.TypeReferenceExtensions.IsDelegate (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0 at cil2as.Extensions.AstTypeExtensions.IsDelegate (ICSharpCode.NRefactory.CSharp.AstType astType) [0x00000] in <filename unknown>:0 at cil2as.Decompiler.Transforms.EraseDelegates.ReplaceDelegateType (ICSharpCode.NRefactory.CSharp.AstType type) [0x00000] in <filename unknown>:0 at cil2as.Decompiler.Transforms.EraseDelegates.VisitSimpleType (ICSharpCode.NRefactory.CSharp.SimpleType simpleType, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.SimpleType.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitCastExpression (ICSharpCode.NRefactory.CSharp.CastExpression castExpression, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.CastExpression.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitInvocationExpression (ICSharpCode.NRefactory.CSharp.InvocationExpression invocationExpression, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.InvocationExpression.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitIfElseStatement (ICSharpCode.NRefactory.CSharp.IfElseStatement ifElseStatement, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.IfElseStatement.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitBlockStatement (ICSharpCode.NRefactory.CSharp.BlockStatement blockStatement, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.BlockStatement.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitForStatement (ICSharpCode.NRefactory.CSharp.ForStatement forStatement, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.ForStatement.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitBlockStatement (ICSharpCode.NRefactory.CSharp.BlockStatement blockStatement, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.BlockStatement.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitMethodDeclaration (ICSharpCode.NRefactory.CSharp.MethodDeclaration methodDeclaration, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.MethodDeclaration.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitNamespaceDeclaration (ICSharpCode.NRefactory.CSharp.NamespaceDeclaration namespaceDeclaration, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.NamespaceDeclaration.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitCompilationUnit (ICSharpCode.NRefactory.CSharp.CompilationUnit unit, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.CompilationUnit.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0 at cil2as.Decompiler.Transforms.DepthFirstAstTransform.Run (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0 at cil2as.Decompiler.ActionScriptAstBuilder.ApplyTransforms (ICSharpCode.NRefactory.CSharp.AstNode node, IEnumerable`1 pipeline) [0x00000] in <filename unknown>:0 at cil2as.Decompiler.ActionScriptAstBuilder.ApplyTransformationPipelineTo (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0 at cil2as.Decompiler.ActionScriptAstBuilder.AstFor (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0 at cil2as.ActionScriptGenerator.AstFor (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0 at cil2as.ActionScriptGenerator.Decompile (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0 at cil2as.ActionScriptGenerator.GenerateActionScriptCodeFor (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0 at cil2as.AssemblyConverter.ConvertTypesToActionScript () [0x00000] in <filename unknown>:0
Hi! thanks for submitting the bug - just to check, have you made sure your project does not feature any of the as yet unsupported stuff on the FAQ pages? http://unity3d.com/unity/preview/faq
Have same issue. No clue why it's not working, my class is very basic. Code (csharp): Failed to convert type Terrain: Mono.Cecil.ResolutionException: Failed to resolve T at cil2as.Extensions.ResolutionExtensions.Resolve[TypeReference,TypeDefinition] (Mono.Cecil.TypeReference reference, System.Func`2 resolve) [0x00000] in <filename unknown>:0 at cil2as.Extensions.ResolutionExtensions.CheckedResolve (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0 at cil2as.Extensions.TypeReferenceExtensions.IsAssignableTo (Mono.Cecil.TypeReference typeRef, System.String typeName) [0x00000] in <filename unknown>:0 at cil2as.Extensions.TypeReferenceExtensions.IsDelegate (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0 at cil2as.Extensions.AstTypeExtensions.IsDelegate (ICSharpCode.NRefactory.CSharp.AstType astType) [0x00000] in <filename unknown>:0 at cil2as.Decompiler.Transforms.EraseDelegates.ReplaceDelegateType (ICSharpCode.NRefactory.CSharp.AstType type) [0x00000] in <filename unknown>:0 at cil2as.Decompiler.Transforms.EraseDelegates.VisitSimpleType (ICSharpCode.NRefactory.CSharp.SimpleType simpleType, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.SimpleType.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitTypeOfExpression (ICSharpCode.NRefactory.CSharp.TypeOfExpression typeOfExpression, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.TypeOfExpression.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitInvocationExpression (ICSharpCode.NRefactory.CSharp.InvocationExpression invocationExpression, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.InvocationExpression.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitVariableInitializer (ICSharpCode.NRefactory.CSharp.VariableInitializer variableInitializer, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.VariableInitializer.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitVariableDeclarationStatement (ICSharpCode.NRefactory.CSharp.VariableDeclarationStatement variableDeclarationStatement, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.VariableDeclarationStatement.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitBlockStatement (ICSharpCode.NRefactory.CSharp.BlockStatement blockStatement, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.BlockStatement.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitMethodDeclaration (ICSharpCode.NRefactory.CSharp.MethodDeclaration methodDeclaration, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.MethodDeclaration.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitNamespaceDeclaration (ICSharpCode.NRefactory.CSharp.NamespaceDeclaration namespaceDeclaration, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.NamespaceDeclaration.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitCompilationUnit (ICSharpCode.NRefactory.CSharp.CompilationUnit unit, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.CompilationUnit.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0 at cil2as.Decompiler.Transforms.DepthFirstAstTransform.Run (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0 at cil2as.Decompiler.ActionScriptAstBuilder.ApplyTransforms (ICSharpCode.NRefactory.CSharp.AstNode node, IEnumerable`1 pipeline) [0x00000] in <filename unknown>:0 at cil2as.Decompiler.ActionScriptAstBuilder.ApplyTransformationPipelineTo (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0 at cil2as.Decompiler.ActionScriptAstBuilder.AstFor (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0 at cil2as.ActionScriptGenerator.AstFor (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0 at cil2as.ActionScriptGenerator.Decompile (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0 at cil2as.ActionScriptGenerator.GenerateActionScriptCodeFor (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0 at cil2as.AssemblyConverter.ConvertTypesToActionScript () [0x00000] in <filename unknown>:0
Yeah, I use lambda and LINQ. LINQ I can live without... in fact, I believe I removed it for iOS reasons (gotta check). But Lamda is just like used all over. Is that just going to be no supported at all? Because even some 3rd party stuff I'm using use it, so expunging such an integral language feature would be nigh impossible. :/ David
Turns out my problem was on this method in the class: Code (csharp): public static T[] ConvertToArray<T>(IList list) { T[] ret = new T[list.Count]; list.CopyTo(ret, 0); return ret; }
Lambdas work, Linq doesn't. Some usage of generics don't work yet (your case above). Workaround would be to not try to invoke a method that relies on a generic type. This is very high on our todo list.
Hmmm.... I use generics all over the place. And I use (and am a contributor to) UIToolkit from Prime31, which uses them liberally. Any way to narrow down what specific usage of generics are not happening in my code? It's all over, so process-of-elimination isn't remotely practical. David
We name mangle methods like this: Public void dosomething(string s, int i). Becomes dosomething_string_int() In this preview build, we need to know the types of those arguments at compile time. So it cannot be T is has to be string. In your sample above its the invocation of new T[] that is tripping up the converter
So returning a generic type doesn't work because you are not unrolling unique instances for each used type (so far anyway), right?
Returning a generic type is ok. The invoker will cast it to the right type. The invoker however does need to know the real type. We are hard at work on improving our support for generics
Hi, I have a similar issue but not related to generics."Fail to resolve UnityEngine.NavMeshAgent". This bug is odd because I can convert the NavMeshExample without problem. This is also the last bug in my project, after I remove the single line: "public var navigator:NavMeshAgent;", it can compile successfully. Anyway for a work around? Thanks. Code (csharp): Failed to convert type AICentral: Mono.Cecil.ResolutionException: Failed to resolve UnityEngine.NavMeshAgent at cil2as.Extensions.ResolutionExtensions.Resolve[TypeReference,TypeDefinition] (Mono.Cecil.TypeReference reference, System.Func`2 resolve) [0x00000] in <filename unknown>:0 at cil2as.Extensions.ResolutionExtensions.CheckedResolve (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0 at cil2as.Decompiler.Transforms.UnityEngineTypePredicates.IsUnityEngineObject (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0 at cil2as.Decompiler.Transforms.ImplementDeserializationSupport.IsSerializableType (Mono.Cecil.TypeReference fieldType) [0x00000] in <filename unknown>:0 at cil2as.Decompiler.Transforms.ImplementDeserializationSupport.IsSerializableField (ICSharpCode.NRefactory.CSharp.FieldDeclaration field) [0x00000] in <filename unknown>:0 at System.Linq.Enumerable+<CreateWhereIterator>c__Iterator35`1[ICSharpCode.NRefactory.CSharp.FieldDeclaration].MoveNext () [0x00000] in <filename unknown>:0 at cil2as.Decompiler.Transforms.ImplementDeserializationSupport.DeserializeImplementation () [0x00000] in <filename unknown>:0 at cil2as.Decompiler.Transforms.ImplementDeserializationSupport.VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitNamespaceDeclaration (ICSharpCode.NRefactory.CSharp.NamespaceDeclaration namespaceDeclaration, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.NamespaceDeclaration.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitCompilationUnit (ICSharpCode.NRefactory.CSharp.CompilationUnit unit, System.Object data) [0x00000] in <filename unknown>:0 at ICSharpCode.NRefactory.CSharp.CompilationUnit.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0 at cil2as.Decompiler.Transforms.DepthFirstAstTransform.Run (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0 at cil2as.Decompiler.ActionScriptAstBuilder.ApplyTransforms (ICSharpCode.NRefactory.CSharp.AstNode node, IEnumerable`1 pipeline) [0x00000] in <filename unknown>:0 at cil2as.Decompiler.ActionScriptAstBuilder.ApplyTransformationPipelineTo (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0 at cil2as.Decompiler.ActionScriptAstBuilder.AstFor (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0 at cil2as.ActionScriptGenerator.AstFor (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0 at cil2as.ActionScriptGenerator.Decompile (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0 at cil2as.ActionScriptGenerator.GenerateActionScriptCodeFor (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0 at cil2as.AssemblyConverter.ConvertTypesToActionScript () [0x00000] in <filename unknown>:0
@Lucas Meijer I was be able to work around this problem by using C# reflection to access properties and methods inside NavMeshAgent (together with GetComponent("NavMeshAgent") from javascript side). This affects performance I assume. If there is a better work around or the bug is fixed, please let me know. Thanks!
C# reflection does not (yet) work in flash. So I'm not sure how you did your workaround, and if it works it works, but keep that in mind
Maybe not the "true" reflection. What I do is just using Type.GetMethod/GetProperty, MethodInfo.Invoke, PropertyInfo.GetValue/SetValue, that's all. Other bug is that in flash export, it doesn't recognize GameObject.GetInstanceID, I have to work around it
I'll look into GetInstanceID() not working, if it doesn't that's a bug. One of our things on our todo list is : "Make Type.GetMethod() MethodINfo.Invoke() etc work" none of that should be working in the current build. if it does for you, then you have a magic build somehow (it might compile and convert but wouldn't do what you'd expect it to do at runtime)
@taumel I'm actually working on porting Temple Run to Unity for Imangi now. Ostensibly for the Android port, but also with an eye towards other versions... Flash is the obvious! I was so hoping it'd "just work".... but got tripped up by the incomplete (so far) support for generics. But I know how it goes! As for geoDefense.... let's just say that I'm under an NDA relative to that. Read into that what you will. David
Ahh okay :O) You know i say this quite seldom as many games suck these days but geoDefense is a hell of a game. It's wonderfully designed and nicely balanced so that it ends up with some depth and character for most levels and i had so much fun with it. Thank you very much for developing it. I hope that at some point there will be a successor, some new levels or at least an level editor. I wish you the best for your upcoming projects.
I am thinking about buying NGUI which I hear the Android version of your game uses. Q1. Is the end result of the GUI as nice as on the iPhone? Q2. Are there any differences? Cheers!