Hello Guest

Author Topic: unity 2017  (Read 7853 times)

babarzor

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 6
    • View Profile
unity 2017
« on: July 24, 2017, 05:14:14 pm »
hello, i tried to migrate my project on the new version of Unity. it works perfectly execpt a small detail: i have a warning at each update:
SendMessage cannot be called during Awake, CheckConsistency, or OnValidate
UnityEngine.MeshFilter:set_sharedMesh(Mesh)
tk2dSprite:OnValidate() (at Assets/TK2DROOT/tk2d/Code/Sprites/tk2dSprite.cs:118)

that doesn't seem to block the game...
(sorry for my english.. im french :-p )

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: unity 2017
« Reply #1 on: July 24, 2017, 09:14:48 pm »
How old is your 2d toolkit? The latest one still has a couple small issues but all of these should have been fixed ages ago...

babarzor

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: unity 2017
« Reply #2 on: July 25, 2017, 01:34:48 am »
Hi! I checked the version. So i was on 2.5.8, i updated to 2.5.8.1 and the warning persist but i noticed a new information about it:

SendMessage cannot be called during Awake, CheckConsistency, or OnValidate
UnityEngine.MeshFilter:set_sharedMesh(Mesh)
tk2dSprite:OnValidate() (at Assets/TK2DROOT/tk2d/Code/Sprites/tk2dSprite.cs:118)
UnityEditor.PrefabUtility:InstantiatePrefab(Object)
tk2dRuntime.TileMap.BuilderUtil:SpawnPrefabsForChunk(tk2dTileMap, SpriteChunk, Int32, Int32, Int32, Int32[]) (at Assets/TK2DROOT/tk2dTileMap/Code/tk2dTileMapBuilderUtil.cs:128)
tk2dRuntime.TileMap.BuilderUtil:SpawnPrefabs(tk2dTileMap, Boolean) (at Assets/TK2DROOT/tk2dTileMap/Code/tk2dTileMapBuilderUtil.cs:202)
tk2dTileMap:Build(BuildFlags) (at Assets/TK2DROOT/tk2dTileMap/Code/tk2dTileMap.cs:326)
tk2dTileMap:Awake() (at Assets/TK2DROOT/tk2dTileMap/Code/tk2dTileMap.cs:121)
UnityEngine.Object:Instantiate(GameObject)
SceneController:changeMap(GameObject, Boolean) (at Assets/Scripts/proto_scripts/SceneController.cs:117)
<goMap>c__Iterator3:MoveNext() (at Assets/Scripts/proto_scripts/SceneController.cs:93)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

it seems that the problem come from one of my scripts when i try to instanciate a tilemap from ressources :-p i know now it is very bad to do like this but i'am a very very noob coder :-p
i have to modify this part to use assetbunble instead as it is recommended. but i don't know if it will correct anything about the warning. to be sure, i also tried to open again the project on unity 5.6 and (except some asserts from migration) the warning disappear ;( ...

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: unity 2017
« Reply #3 on: July 26, 2017, 04:55:29 pm »
I don't have any tests that instantiate this from resources, I'll take a look for you.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: unity 2017
« Reply #4 on: July 26, 2017, 11:29:48 pm »
Hi there,

Just investigated this and found a bug with tk2d in Unity 2017.1. I have fixed it and will issue an update.
ps. Instantiating from a prefab in resources works fine :)

Fix here - http://2dtoolkit.com/forum/index.php/topic,5511.0.html
« Last Edit: July 27, 2017, 11:56:15 am by unikronsoftware »

babarzor

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: unity 2017
« Reply #5 on: July 27, 2017, 04:56:43 pm »
Great! thx a lot! :-)

babarzor

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: unity 2017
« Reply #6 on: August 02, 2017, 04:03:10 am »
Hi! Actually i don't know how to find the lastest version of 2dtoolkit. :-p on unity store is still the 2.5.8.1

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: unity 2017
« Reply #7 on: August 02, 2017, 10:11:15 am »
I will be updating the Unity asset store version tonight.

If you want to get it from here, register your copy following instructions below:
http://2dtoolkit.com/forum/index.php/topic,34.0.html