Author Topic: Error building Flash Player with latest NGUI  (Read 2030 times)

Moe

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Error building Flash Player with latest NGUI
« on: June 20, 2014, 11:57:22 AM »
Unity 4.5.0f6
NGUI 3.6.4b

Hi, when i try to build and run to Flash Player i get these error messages:

1) Assets/NGUI/Scripts/Internal/UIDrawCall.cs(290,55): error CS1061: Type `UnityEngine.Material' does not contain a definition for `shaderKeywords' and no extension method `shaderKeywords' of type `UnityEngine.Material' could be found (are you missing a using directive or an assembly reference?)

2) Assets/NGUI/Scripts/UI/UILabel.cs(1148,34): error CS0117: `NGUIText' does not contain a definition for `dynamicFont'
same error on the following lines:1263,42 - 1268,34 - 1390,34 - 1448,26 - 1473,26 - 1590,26 - 1647,26

If i comment out lines 290-292 and add #if DYNAMIC_FONT to all the dynamic font references, it builds up to 'Postprocessing Player' and throws these errors:

1) Failed to convert type 'NGUITools': Failed to resolve T
Mono.Cecil.ResolutionException: Failed to resolve T
  at Unity.CecilTools.Extensions.ResolutionExtensions.Resolve[TypeReference,TypeDefinition] (Mono.Cecil.TypeReference reference, System.Func`2 resolve) [0x00000] in <filename unknown>:0
  at Unity.CecilTools.Extensions.ResolutionExtensions.CheckedResolve (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0
  at Unity.CecilTools.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.Decompiler.Transforms.OptimizeCasts.RequiresCastAs (ICSharpCode.NRefactory.CSharp.AstType type) [0x00000] in <filename unknown>:0
  at cil2as.Decompiler.Transforms.OptimizeCasts.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].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].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.EcmaScriptAstBuilder.ApplyTransforms (ICSharpCode.NRefactory.CSharp.AstNode node, IEnumerable`1 pipeline) [0x00000] in <filename unknown>:0
  at cil2as.Decompiler.EcmaScriptAstBuilder.ApplyTransformationPipelineTo (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0
  at cil2as.Decompiler.EcmaScriptAstBuilder.AstFor (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0
  at cil2as.EcmaScriptGenerator.AstFor (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0
  at cil2as.EcmaScriptGenerator.Decompile (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0
  at cil2as.EcmaScriptGenerator.GenerateActionScriptCodeFor (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0
  at cil2as.AssemblyConverter.ConvertTypesToActionScript () [0x00000] in <filename unknown>:0



2) Error building Player: Exception: C:/Users/Moe/UnityPro/Data/PlaybackEngines/FlashSupport\BuildTools\cil2as\cil2as.exe Failed:

ERROR: Failed to convert type 'NGUITools': Failed to resolve T
Mono.Cecil.ResolutionException: Failed to resolve T
  at Unity.CecilTools.Extensions.ResolutionExtensions.Resolve[TypeReference,TypeDefinition] (Mono.Cecil.TypeReference reference, System.Func`2 resolve) [0x00000] in <filename unknown>:0
  at Unity.CecilTools.Extensions.ResolutionExtensions.CheckedResolve (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0
  at Unity.CecilTools.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.Decompiler.Transforms.OptimizeCasts.RequiresCastAs (ICSharpCode.NRefactory.CSharp.AstType type) [0x00000] in <filename unknown>:0
  at cil2as.Decompiler.Transforms.OptimizeCasts.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].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].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.EcmaScriptAstBuilder.ApplyTransforms (ICSharpCode.NRefactory.CSharp.AstNode node, IEnumerable`1 pipeline) [0x00000] in <filename unknown>:0
  at cil2as.Decompiler.EcmaScriptAstBuilder.ApplyTransformationPipelineTo (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0
  at cil2as.Decompiler.EcmaScriptAstBuilder.AstFor (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0
  at cil2as.EcmaScriptGenerator.AstFor (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0
  at cil2as.EcmaScriptGenerator.Decompile (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0
  at cil2as.EcmaScriptGenerator.GenerateActionScriptCodeFor (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0
  at cil2as.AssemblyConverter.ConvertTypesToActionScript () [0x00000] in <filename unknown>:0

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Error building Flash Player with latest NGUI
« Reply #1 on: June 21, 2014, 03:26:55 PM »
I'll fix them for 3.6.5, but why do you still use Flash? Unity stopped supporting Flash a year ago, and many features don't work properly in Flash.

Moe

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Error building Flash Player with latest NGUI
« Reply #2 on: June 21, 2014, 04:50:17 PM »
Making something for a client's website and they don't expect the end-user to install Unity web player so i told them i'd do it in Flash. I'm a little passed deadline and i'd be extremely grateful if you could fix the problem asap please although i do understand you're a busy man  :D

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Error building Flash Player with latest NGUI
« Reply #3 on: June 22, 2014, 10:45:19 PM »
I released 3.6.5 yesterday, and Flash fixes were a part of that release.