Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Cannot build Flash

Discussion in 'Flash' started by nsxdavid, Dec 23, 2011.

  1. nsxdavid

    nsxdavid

    Joined:
    Apr 6, 2009
    Posts:
    476
    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):
    1. Failed to convert type Ext: Mono.Cecil.ResolutionException: Failed to resolve T
    2.   at cil2as.Extensions.ResolutionExtensions.Resolve[TypeReference,TypeDefinition] (Mono.Cecil.TypeReference reference, System.Func`2 resolve) [0x00000] in <filename unknown>:0
    3.   at cil2as.Extensions.ResolutionExtensions.CheckedResolve (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0
    4.   at cil2as.Extensions.TypeReferenceExtensions.IsAssignableTo (Mono.Cecil.TypeReference typeRef, System.String typeName) [0x00000] in <filename unknown>:0
    5.   at cil2as.Extensions.TypeReferenceExtensions.IsDelegate (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0
    6.   at cil2as.Extensions.AstTypeExtensions.IsDelegate (ICSharpCode.NRefactory.CSharp.AstType astType) [0x00000] in <filename unknown>:0
    7.   at cil2as.Decompiler.Transforms.EraseDelegates.ReplaceDelegateType (ICSharpCode.NRefactory.CSharp.AstType type) [0x00000] in <filename unknown>:0
    8.   at cil2as.Decompiler.Transforms.EraseDelegates.VisitSimpleType (ICSharpCode.NRefactory.CSharp.SimpleType simpleType, System.Object data) [0x00000] in <filename unknown>:0
    9.   at ICSharpCode.NRefactory.CSharp.SimpleType.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0
    10.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0
    11.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitCastExpression (ICSharpCode.NRefactory.CSharp.CastExpression castExpression, System.Object data) [0x00000] in <filename unknown>:0
    12.   at ICSharpCode.NRefactory.CSharp.CastExpression.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0
    13.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0
    14.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitInvocationExpression (ICSharpCode.NRefactory.CSharp.InvocationExpression invocationExpression, System.Object data) [0x00000] in <filename unknown>:0
    15.   at ICSharpCode.NRefactory.CSharp.InvocationExpression.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0
    16.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0
    17.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitIfElseStatement (ICSharpCode.NRefactory.CSharp.IfElseStatement ifElseStatement, System.Object data) [0x00000] in <filename unknown>:0
    18.   at ICSharpCode.NRefactory.CSharp.IfElseStatement.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0
    19.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0
    20.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitBlockStatement (ICSharpCode.NRefactory.CSharp.BlockStatement blockStatement, System.Object data) [0x00000] in <filename unknown>:0
    21.   at ICSharpCode.NRefactory.CSharp.BlockStatement.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0
    22.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0
    23.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitForStatement (ICSharpCode.NRefactory.CSharp.ForStatement forStatement, System.Object data) [0x00000] in <filename unknown>:0
    24.   at ICSharpCode.NRefactory.CSharp.ForStatement.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0
    25.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0
    26.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitBlockStatement (ICSharpCode.NRefactory.CSharp.BlockStatement blockStatement, System.Object data) [0x00000] in <filename unknown>:0
    27.   at ICSharpCode.NRefactory.CSharp.BlockStatement.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0
    28.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0
    29.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitMethodDeclaration (ICSharpCode.NRefactory.CSharp.MethodDeclaration methodDeclaration, System.Object data) [0x00000] in <filename unknown>:0
    30.   at ICSharpCode.NRefactory.CSharp.MethodDeclaration.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0
    31.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0
    32.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration, System.Object data) [0x00000] in <filename unknown>:0
    33.   at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0
    34.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0
    35.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitNamespaceDeclaration (ICSharpCode.NRefactory.CSharp.NamespaceDeclaration namespaceDeclaration, System.Object data) [0x00000] in <filename unknown>:0
    36.   at ICSharpCode.NRefactory.CSharp.NamespaceDeclaration.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0
    37.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0
    38.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitCompilationUnit (ICSharpCode.NRefactory.CSharp.CompilationUnit unit, System.Object data) [0x00000] in <filename unknown>:0
    39.   at ICSharpCode.NRefactory.CSharp.CompilationUnit.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0
    40.   at cil2as.Decompiler.Transforms.DepthFirstAstTransform.Run (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0
    41.   at cil2as.Decompiler.ActionScriptAstBuilder.ApplyTransforms (ICSharpCode.NRefactory.CSharp.AstNode node, IEnumerable`1 pipeline) [0x00000] in <filename unknown>:0
    42.   at cil2as.Decompiler.ActionScriptAstBuilder.ApplyTransformationPipelineTo (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0
    43.   at cil2as.Decompiler.ActionScriptAstBuilder.AstFor (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0
    44.   at cil2as.ActionScriptGenerator.AstFor (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0
    45.   at cil2as.ActionScriptGenerator.Decompile (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0
    46.   at cil2as.ActionScriptGenerator.GenerateActionScriptCodeFor (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0
    47.   at cil2as.AssemblyConverter.ConvertTypesToActionScript () [0x00000] in <filename unknown>:0
    48.  
    49.  
     
  2. willgoldstone

    willgoldstone

    Unity Technologies

    Joined:
    Oct 2, 2006
    Posts:
    794
    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
     
  3. sensorium7

    sensorium7

    Joined:
    Dec 23, 2011
    Posts:
    3
    Have same issue. No clue why it's not working, my class is very basic.

    Code (csharp):
    1. Failed to convert type Terrain: Mono.Cecil.ResolutionException: Failed to resolve T
    2.   at cil2as.Extensions.ResolutionExtensions.Resolve[TypeReference,TypeDefinition] (Mono.Cecil.TypeReference reference, System.Func`2 resolve) [0x00000] in <filename unknown>:0
    3.   at cil2as.Extensions.ResolutionExtensions.CheckedResolve (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0
    4.   at cil2as.Extensions.TypeReferenceExtensions.IsAssignableTo (Mono.Cecil.TypeReference typeRef, System.String typeName) [0x00000] in <filename unknown>:0
    5.   at cil2as.Extensions.TypeReferenceExtensions.IsDelegate (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0
    6.   at cil2as.Extensions.AstTypeExtensions.IsDelegate (ICSharpCode.NRefactory.CSharp.AstType astType) [0x00000] in <filename unknown>:0
    7.   at cil2as.Decompiler.Transforms.EraseDelegates.ReplaceDelegateType (ICSharpCode.NRefactory.CSharp.AstType type) [0x00000] in <filename unknown>:0
    8.   at cil2as.Decompiler.Transforms.EraseDelegates.VisitSimpleType (ICSharpCode.NRefactory.CSharp.SimpleType simpleType, System.Object data) [0x00000] in <filename unknown>:0
    9.   at ICSharpCode.NRefactory.CSharp.SimpleType.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0
    10.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0
    11.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitTypeOfExpression (ICSharpCode.NRefactory.CSharp.TypeOfExpression typeOfExpression, System.Object data) [0x00000] in <filename unknown>:0
    12.   at ICSharpCode.NRefactory.CSharp.TypeOfExpression.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0
    13.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0
    14.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitInvocationExpression (ICSharpCode.NRefactory.CSharp.InvocationExpression invocationExpression, System.Object data) [0x00000] in <filename unknown>:0
    15.   at ICSharpCode.NRefactory.CSharp.InvocationExpression.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0
    16.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0
    17.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitVariableInitializer (ICSharpCode.NRefactory.CSharp.VariableInitializer variableInitializer, System.Object data) [0x00000] in <filename unknown>:0
    18.   at ICSharpCode.NRefactory.CSharp.VariableInitializer.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0
    19.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0
    20.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitVariableDeclarationStatement (ICSharpCode.NRefactory.CSharp.VariableDeclarationStatement variableDeclarationStatement, System.Object data) [0x00000] in <filename unknown>:0
    21.   at ICSharpCode.NRefactory.CSharp.VariableDeclarationStatement.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0
    22.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0
    23.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitBlockStatement (ICSharpCode.NRefactory.CSharp.BlockStatement blockStatement, System.Object data) [0x00000] in <filename unknown>:0
    24.   at ICSharpCode.NRefactory.CSharp.BlockStatement.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0
    25.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0
    26.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitMethodDeclaration (ICSharpCode.NRefactory.CSharp.MethodDeclaration methodDeclaration, System.Object data) [0x00000] in <filename unknown>:0
    27.   at ICSharpCode.NRefactory.CSharp.MethodDeclaration.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0
    28.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0
    29.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration, System.Object data) [0x00000] in <filename unknown>:0
    30.   at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0
    31.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0
    32.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitNamespaceDeclaration (ICSharpCode.NRefactory.CSharp.NamespaceDeclaration namespaceDeclaration, System.Object data) [0x00000] in <filename unknown>:0
    33.   at ICSharpCode.NRefactory.CSharp.NamespaceDeclaration.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0
    34.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0
    35.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitCompilationUnit (ICSharpCode.NRefactory.CSharp.CompilationUnit unit, System.Object data) [0x00000] in <filename unknown>:0
    36.   at ICSharpCode.NRefactory.CSharp.CompilationUnit.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0
    37.   at cil2as.Decompiler.Transforms.DepthFirstAstTransform.Run (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0
    38.   at cil2as.Decompiler.ActionScriptAstBuilder.ApplyTransforms (ICSharpCode.NRefactory.CSharp.AstNode node, IEnumerable`1 pipeline) [0x00000] in <filename unknown>:0
    39.   at cil2as.Decompiler.ActionScriptAstBuilder.ApplyTransformationPipelineTo (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0
    40.   at cil2as.Decompiler.ActionScriptAstBuilder.AstFor (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0
    41.   at cil2as.ActionScriptGenerator.AstFor (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0
    42.   at cil2as.ActionScriptGenerator.Decompile (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0
    43.   at cil2as.ActionScriptGenerator.GenerateActionScriptCodeFor (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0
    44.   at cil2as.AssemblyConverter.ConvertTypesToActionScript () [0x00000] in <filename unknown>:0
    45.  
    46.  
     
  4. nsxdavid

    nsxdavid

    Joined:
    Apr 6, 2009
    Posts:
    476
    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
     
  5. sensorium7

    sensorium7

    Joined:
    Dec 23, 2011
    Posts:
    3
    Turns out my problem was on this method in the class:

    Code (csharp):
    1.  
    2.     public static T[] ConvertToArray<T>(IList list)
    3.     {
    4.         T[] ret = new T[list.Count];
    5.         list.CopyTo(ret, 0);
    6.         return ret;
    7.     }
    8.  
     
  6. akwok

    akwok

    Joined:
    Apr 21, 2009
    Posts:
    31
    same problem here, cannot resolve generic class. generating same stack traces as sensorium7.
     
  7. Lucas Meijer_old

    Lucas Meijer_old

    Joined:
    Apr 5, 2008
    Posts:
    436
    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.
     
  8. nsxdavid

    nsxdavid

    Joined:
    Apr 6, 2009
    Posts:
    476
    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
     
  9. Lucas Meijer_old

    Lucas Meijer_old

    Joined:
    Apr 5, 2008
    Posts:
    436
    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
     
  10. akwok

    akwok

    Joined:
    Apr 21, 2009
    Posts:
    31
    thx for the explanation, is there any timeline that this issue can be tackled?
     
  11. nsxdavid

    nsxdavid

    Joined:
    Apr 6, 2009
    Posts:
    476
    So returning a generic type doesn't work because you are not unrolling unique instances for each used type (so far anyway), right?
     
  12. Lucas Meijer_old

    Lucas Meijer_old

    Joined:
    Apr 5, 2008
    Posts:
    436
    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
     
  13. innorevo

    innorevo

    Joined:
    Dec 25, 2011
    Posts:
    18
    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):
    1. Failed to convert type AICentral: Mono.Cecil.ResolutionException: Failed to resolve UnityEngine.NavMeshAgent
    2.   at cil2as.Extensions.ResolutionExtensions.Resolve[TypeReference,TypeDefinition] (Mono.Cecil.TypeReference reference, System.Func`2 resolve) [0x00000] in <filename unknown>:0
    3.   at cil2as.Extensions.ResolutionExtensions.CheckedResolve (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0
    4.   at cil2as.Decompiler.Transforms.UnityEngineTypePredicates.IsUnityEngineObject (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0
    5.   at cil2as.Decompiler.Transforms.ImplementDeserializationSupport.IsSerializableType (Mono.Cecil.TypeReference fieldType) [0x00000] in <filename unknown>:0
    6.   at cil2as.Decompiler.Transforms.ImplementDeserializationSupport.IsSerializableField (ICSharpCode.NRefactory.CSharp.FieldDeclaration field) [0x00000] in <filename unknown>:0
    7.   at System.Linq.Enumerable+<CreateWhereIterator>c__Iterator35`1[ICSharpCode.NRefactory.CSharp.FieldDeclaration].MoveNext () [0x00000] in <filename unknown>:0
    8.   at cil2as.Decompiler.Transforms.ImplementDeserializationSupport.DeserializeImplementation () [0x00000] in <filename unknown>:0
    9.   at cil2as.Decompiler.Transforms.ImplementDeserializationSupport.VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration, System.Object data) [0x00000] in <filename unknown>:0
    10.   at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0
    11.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0
    12.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitNamespaceDeclaration (ICSharpCode.NRefactory.CSharp.NamespaceDeclaration namespaceDeclaration, System.Object data) [0x00000] in <filename unknown>:0
    13.   at ICSharpCode.NRefactory.CSharp.NamespaceDeclaration.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0
    14.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node, System.Object data) [0x00000] in <filename unknown>:0
    15.   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor`2[System.Object,System.Object].VisitCompilationUnit (ICSharpCode.NRefactory.CSharp.CompilationUnit unit, System.Object data) [0x00000] in <filename unknown>:0
    16.   at ICSharpCode.NRefactory.CSharp.CompilationUnit.AcceptVisitor[Object,Object] (IAstVisitor`2 visitor, System.Object data) [0x00000] in <filename unknown>:0
    17.   at cil2as.Decompiler.Transforms.DepthFirstAstTransform.Run (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0
    18.   at cil2as.Decompiler.ActionScriptAstBuilder.ApplyTransforms (ICSharpCode.NRefactory.CSharp.AstNode node, IEnumerable`1 pipeline) [0x00000] in <filename unknown>:0
    19.   at cil2as.Decompiler.ActionScriptAstBuilder.ApplyTransformationPipelineTo (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0
    20.   at cil2as.Decompiler.ActionScriptAstBuilder.AstFor (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0
    21.   at cil2as.ActionScriptGenerator.AstFor (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0
    22.   at cil2as.ActionScriptGenerator.Decompile (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0
    23.   at cil2as.ActionScriptGenerator.GenerateActionScriptCodeFor (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0
    24.   at cil2as.AssemblyConverter.ConvertTypesToActionScript () [0x00000] in <filename unknown>:0
    25.  
     
  14. Lucas Meijer_old

    Lucas Meijer_old

    Joined:
    Apr 5, 2008
    Posts:
    436
    A quick workaround would be to make it private instead of public. Looks like a bug on our end
     
  15. innorevo

    innorevo

    Joined:
    Dec 25, 2011
    Posts:
    18
    I set it to private, the problem still remains :(
     
  16. innorevo

    innorevo

    Joined:
    Dec 25, 2011
    Posts:
    18
    @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! :)
     
  17. Lucas Meijer_old

    Lucas Meijer_old

    Joined:
    Apr 5, 2008
    Posts:
    436
    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 :)
     
  18. innorevo

    innorevo

    Joined:
    Dec 25, 2011
    Posts:
    18
    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 :)
     
  19. Lucas Meijer_old

    Lucas Meijer_old

    Joined:
    Apr 5, 2008
    Posts:
    436
    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)
     
  20. innorevo

    innorevo

    Joined:
    Dec 25, 2011
    Posts:
    18
    You are right, now I notice, it does compile and convert, but does not run correctly T_T
     
  21. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,292
    @nsxdavid
    So there will be geoDefense for Flash?
     
  22. nsxdavid

    nsxdavid

    Joined:
    Apr 6, 2009
    Posts:
    476
    @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. :D

    David
     
  23. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,292
    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.
     
    Last edited: Dec 29, 2011
  24. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    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!