Author Topic: Many Warnings after upgrading to 2017.1  (Read 6665 times)

wohltaeter

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
Many Warnings after upgrading to 2017.1
« on: July 13, 2017, 01:37:19 AM »
Hi,
after I started the scene I get around 80- 100 times of this warning:
"SendMessage cannot be called during Awake, CheckConsistency, or OnValidate
UnityEngine.Transform:set_localPosition(Vector3)
UIGrid:ResetPosition(List`1) (at Assets/Plugins/Scripts/Interaction/UIGrid.cs:386)
UIGrid:Reposition() (at Assets/Plugins/Scripts/Interaction/UIGrid.cs:318)
UIGrid:OnValidate() (at Assets/Plugins/Scripts/Interaction/UIGrid.cs:283)"

What could be the solution?

Thanks in Advance!

peromina

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Many Warnings after upgrading to 2017.1
« Reply #1 on: July 14, 2017, 01:29:02 AM »
I changed "AS TextArea" to "TextArea" to solve the problem.

peromina

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Many Warnings after upgrading to 2017.1
« Reply #2 on: July 14, 2017, 02:17:30 AM »
Oops Sorry.

I put the comment in the wrong place.

But I couldn't find a "delete" button..so I can't remove my reply.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Many Warnings after upgrading to 2017.1
« Reply #3 on: July 15, 2017, 05:55:31 AM »
Seems Unity 2017.1 re-introduced an old bug back that was briefly there in Unity 5.5 beta: https://issuetracker.unity3d.com/issues/component-dot-tag-during-onvalidate-throws-console-warning-regarding-sendmessage

As you can see from the call stack, there is no SendMessage used at all -- in fact all that happens is transform.localPosition is set -- yet the warnings still show up. Unfortunately there's not much I can do on my end. Not setting localPosition will effectively turn off the ability to adjust UIGrid and UITable's values from inspector.

Fortunately this is an editor-only issue, and doesn't seem to do anything other than spit warnings for no reason, so it can generally be ignored until Unity fixes it. I'd still suggest voting on the bug report though.

wohltaeter

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
Re: Many Warnings after upgrading to 2017.1
« Reply #4 on: July 17, 2017, 02:14:12 AM »
Thanks much for the reply. - I voted, too.

Aurigan

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 21
    • View Profile
Re: Many Warnings after upgrading to 2017.1
« Reply #5 on: November 02, 2017, 06:46:31 PM »
This was driving me nuts so I changed UIGrid line 283 to:

  1. void OnValidate () { if (!Application.isPlaying && NGUITools.GetActive(this)) Invoke(nameof(Reposition),0.01f); }