playMaker

Author Topic: unity editor not showing up but is opening  (Read 2092 times)

misterjuly

  • Sr. Member
  • ****
  • Posts: 334
Re: unity editor not showing up but is opening
« Reply #15 on: May 18, 2023, 05:24:42 PM »
Last picture. Thanks again!

misterjuly

  • Sr. Member
  • ****
  • Posts: 334
Re: unity editor not showing up but is opening
« Reply #16 on: May 18, 2023, 05:32:19 PM »
I was wrong; actually have more of these platforms in the other scene and it runs like butter. Don't know what the problem is...

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: unity editor not showing up but is opening
« Reply #17 on: May 18, 2023, 06:33:32 PM »
Hi.
Try to make a copy of the scene and try removing parts of the scene to narrow down the issue.

I you are not yet using version control (like github for example)
I strongly suggest to look into using this.

if you would have used it, you could just revert to a previous update.
also if you want to experiment something you can easily discards the changes you did

misterjuly

  • Sr. Member
  • ****
  • Posts: 334
Re: unity editor not showing up but is opening
« Reply #18 on: May 18, 2023, 07:15:13 PM »
I know for a fact that it is the game object I think it is. I have disabled it and it runs fine. I have a back up on my external hard drive. That's how I was able to get the file I needed for the global variables (it was just a few days old, so I would have lost some progress, but I didn't make any new global variables in that time). The weird thing is I have this exact object in another scene several times and I get nearly 100 fps. If you would be willing to look at the fsms I posted to see if there is anything weird that would be great. In the meantime, I will try to copy the scene. Thanks!

misterjuly

  • Sr. Member
  • ****
  • Posts: 334
Re: unity editor not showing up but is opening
« Reply #19 on: May 18, 2023, 08:17:24 PM »
So it seems like my tile map for whatever reason is causing more lag. I currently have a tile map collider set to used by composite. I also have a rigid body 2d set to kinematic. I am using Polygons for geometry type (I need it to register collisions inside the ground). Generation type synchronous. Hopefully this helps us to figure it out. Thanks!

misterjuly

  • Sr. Member
  • ****
  • Posts: 334
Re: unity editor not showing up but is opening
« Reply #20 on: May 18, 2023, 08:41:30 PM »
I've narrowed it down to the tile map collider (if I remove it I get nearly 100 fps, like my other scene. All other settings I think are default. It is not a huge tilemap. What could be causing this? Thanks!

misterjuly

  • Sr. Member
  • ****
  • Posts: 334
Re: unity editor not showing up but is opening
« Reply #21 on: May 18, 2023, 09:42:01 PM »
I tried separating it into two different tile maps just to see if it was the size that was the issue. Still very slow. I did try disabling half of it and that seemed to make it go up a fair amount. Its probably only several 1000 tiles (not tens of thousands or anything) Shouldn't it be able to run that?

misterjuly

  • Sr. Member
  • ****
  • Posts: 334
Re: unity editor not showing up but is opening
« Reply #22 on: May 18, 2023, 09:53:53 PM »
So if it is the TileMap size, how could I get it to only display what is on camera? Is there an easy way to do this or do I need to have triggers and break it down into areas and have them be activated that way? Thanks!

Christoph

  • Beta Group
  • Sr. Member
  • *
  • Posts: 254
Re: unity editor not showing up but is opening
« Reply #23 on: May 19, 2023, 08:55:17 AM »
Not sure what you do in those FSMs but half the actions won’t run ever and why the heck are you enabling FSMs in update? Try to disable actions and see it it makes a difference.

misterjuly

  • Sr. Member
  • ****
  • Posts: 334
Re: unity editor not showing up but is opening
« Reply #24 on: May 19, 2023, 10:34:39 AM »
I intentionally don't want it to run when the trigger happens. How do you control if the enable fsm action is in update or not? Do you mean the rotate action? If so, then I want it to line up even if frame rate goes slow. I really do think the Tilemap is the bigger issue though as the scene that always runs at nearly 100 fps has a much smaller Tilemap then this scene and they both have this logic on about an equal number of objects. And it is not the renderer but the Tilemap collider 2d (and I don't think it is the composite collider though I don't know for sure). Thanks!

misterjuly

  • Sr. Member
  • ****
  • Posts: 334
Re: unity editor not showing up but is opening
« Reply #25 on: May 19, 2023, 11:53:22 AM »
I fixed it by changing the Rigidbody2d on the Tilemap to static. Now I get around 70 fps in the editor. Thanks!

Christoph

  • Beta Group
  • Sr. Member
  • *
  • Posts: 254
Re: unity editor not showing up but is opening
« Reply #26 on: May 19, 2023, 02:13:18 PM »
Yeah I honestly have no clue about tilemaps. Never used them. You might wanna follow some of the official tutorials in case you haven't done yet. This way you might pick up something that you have missed otherwise:

https://blog.unity.com/games/2d-tilemap-asset-workflow-from-image-to-level

or this which is newer and more complete:
https://learn.unity.com/tutorial/introduction-to-tilemaps

Regarding your FSM states for example the first one:



I'm not the expert so djaydino might correct me if I'm wrong, but here you tell the owner to rotate continuously every frame (this means it's in update). And at the same time you are listening to a trigger 2D event. Once that event is triggered you move on to the next state.

The Set Collider 2d Physics action never runs since due to the Rotate action in update the state keeps continuously in this action.

In this second one:



You have a trigger 2D event waiting to be triggered and at the same time you are running a wait action that when finished triggers the "m" event. Whatever happens first. The Set Collider 2D Physics and the Enable FSM actions are never run I think.

Christoph

  • Beta Group
  • Sr. Member
  • *
  • Posts: 254

misterjuly

  • Sr. Member
  • ****
  • Posts: 334
Re: unity editor not showing up but is opening
« Reply #28 on: May 19, 2023, 09:55:16 PM »
Thanks for the links and info. Will look into it when I have time. Thanks again for your help! I really appreciate it!