Author Topic: Flash conversion error, last NGUI update  (Read 1526 times)

elandar

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Flash conversion error, last NGUI update
« on: March 14, 2014, 10:40:57 PM »
Hello, after last update I experiencing this errors:
Failed to convert type 'UITweener': Failed to resolve T
Error building Player: Exception: /Applications/Unity/Unity.app/Contents/PlaybackEngines/FlashSupport/BuildTools/cil2as/cil2as.exe Failed:

I am breaking project deadlines, help me solve this issue please. Stack trace:

Failed to convert type 'UITweener': Failed to resolve T
cil2as.Decompiler.Core.ConversionException: 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].VisitAssignmentExpression (ICSharpCode.NRefactory.CSharp.AssignmentExpression assignmentExpression, System.Object data) [0x00000] in <filename unknown>:0
  at ICSharpCode.NRefactory.CSharp.AssignmentExpression.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 cil2as.Decompiler.Transforms.ErrorLoggingDepthFirstAstTransform+<VisitExpressionStatement>c__AnonStorey30.<>m__79 () [0x00000] in <filename unknown>:0
  at cil2as.Decompiler.Transforms.ErrorLoggingDepthFirstAstTransform.WithErrorLoggingOn (ICSharpCode.NRefactory.CSharp.AstNode sourceNode, System.Func`1 action) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at cil2as.Decompiler.Transforms.ErrorLoggingDepthFirstAstTransform.WithErrorLoggingOn (ICSharpCode.NRefactory.CSharp.AstNode sourceNode, System.Func`1 action) [0x00000] in <filename unknown>:0
  at cil2as.Decompiler.Transforms.ErrorLoggingDepthFirstAstTransform.VisitExpressionStatement (ICSharpCode.NRefactory.CSharp.ExpressionStatement expressionStatement, System.Object data) [0x00000] in <filename unknown>:0
  at ICSharpCode.NRefactory.CSharp.ExpressionStatement.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].VisitWhileStatement (ICSharpCode.NRefactory.CSharp.WhileStatement whileStatement, System.Object data) [0x00000] in <filename unknown>:0
  at ICSharpCode.NRefactory.CSharp.WhileStatement.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].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].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


Error building Player: Exception: /Applications/Unity/Unity.app/Contents/PlaybackEngines/FlashSupport/BuildTools/cil2as/cil2as.exe Failed:

ERROR: Failed to convert type 'UITweener': Failed to resolve T
cil2as.Decompiler.Core.ConversionException: 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].VisitAssignmentExpression (ICSharpCode.NRefactory.CSharp.AssignmentExpression assignmentExpression, System.Object data) [0x00000] in <filename unknown>:0
  at ICSharpCode.NRefactory.CSharp.AssignmentExpression.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 cil2as.Decompiler.Transforms.ErrorLoggingDepthFirstAstTransform+<VisitExpressionStatement>c__AnonStorey30.<>m__79 () [0x00000] in <filename unknown>:0
  at cil2as.Decompiler.Transforms.ErrorLoggingDepthFirstAstTransform.WithErrorLoggingOn (ICSharpCode.NRefactory.CSharp.AstNode sourceNode, System.Func`1 action) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at cil2as.Decompiler.Transforms.ErrorLoggingDepthFirstAstTransform.WithErrorLoggingOn (ICSharpCode.NRefactory.CSharp.AstNode sourceNode, System.Func`1 action) [0x00000] in <filename unknown>:0
  at cil2as.Decompiler.Transforms.ErrorLoggingDepthFirstAstTransform.VisitExpressionStatement (ICSharpCode.NRefactory.CSharp.ExpressionStatement expressionStatement, System.Object data) [0x00000] in <filename unknown>:0
  at ICSharpCode.NRefactory.CSharp.ExpressionStatement.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].VisitWhileStatement (ICSharpCode.NRefactory.CSharp.WhileStatement whileStatement, System.Object data) [0x00000] in <filename unknown>:0
  at ICSharpCode.NRefactory.CSharp.WhileStatement.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].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].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: Flash conversion error, last NGUI update
« Reply #1 on: March 15, 2014, 05:48:22 PM »
Change UITweener.Begin<> function to this:
  1.         static public T Begin<T> (GameObject go, float duration) where T : UITweener
  2.         {
  3.                 T comp = go.GetComponent<T>();
  4. #if UNITY_FLASH
  5.                 if ((object)comp == null) comp = (T)go.AddComponent<T>();
  6. #else
  7.                 // Find the tween with an unset group ID (group ID of 0).
  8.                 if (comp != null && comp.tweenGroup != 0)
  9.                 {
  10.                         comp = null;
  11.                         T[] comps = go.GetComponents<T>();
  12.                         for (int i = 0, imax = comps.Length; i < imax; ++i)
  13.                         {
  14.                                 comp = comps[i];
  15.                                 if (comp != null && comp.tweenGroup == 0) break;
  16.                                 comp = null;
  17.                         }
  18.                 }
  19.  
  20.                 if (comp == null) comp = go.AddComponent<T>();
  21. #endif
  22.                 comp.mStarted = false;
  23.                 comp.duration = duration;
  24.                 comp.mFactor = 0f;
  25.                 comp.mAmountPerDelta = Mathf.Abs(comp.mAmountPerDelta);
  26.                 comp.style = Style.Once;
  27.                 comp.animationCurve = new AnimationCurve(new Keyframe(0f, 0f, 0f, 1f), new Keyframe(1f, 1f, 1f, 0f));
  28.                 comp.eventReceiver = null;
  29.                 comp.callWhenFinished = null;
  30.                 comp.enabled = true;
  31.  
  32.                 if (duration <= 0f)
  33.                 {
  34.                         comp.Sample(1f, true);
  35.                         comp.enabled = false;
  36.                 }
  37.                 return comp;
  38.         }