playMaker

Author Topic: Big Scene size due to FSMs  (Read 172 times)

Meka Games

  • Junior Playmaker
  • **
  • Posts: 61
Big Scene size due to FSMs
« on: May 12, 2024, 11:54:52 AM »
Since I'm developing a mobile game, every megabyte matters to me. My main menu scene is 10.5 MB, which already causes long loading times...

As you can see in the image, even a single FSM alone takes up 1 MB of space.

When I delete all the FSMs in my main menu, the size drops from 10.5 MB to 500 KB

What can I do to prevent this?

Meka Games

  • Junior Playmaker
  • **
  • Posts: 61
Re: Big Scene size due to FSMs
« Reply #1 on: May 13, 2024, 11:12:26 AM »
I couldn't find any posts on the forum about this topic. Anyone have any ideas?

600

  • Moderator
  • Hero Member
  • *****
  • Posts: 716
    • Flashing Lights
Re: Big Scene size due to FSMs
« Reply #2 on: May 14, 2024, 02:18:00 AM »
More important is exported build size, not the file size shown in windows explorer. Also scene size likely increased if you have prefabs/textures/audio referenced in that scene, FSMs alone usually are not heavy.
Depending on platform look up for optimizing builds by compressing textures/audio in Unity's import settings (selecting an asset and look at inspector) and changing other project settings

Meka Games

  • Junior Playmaker
  • **
  • Posts: 61
Re: Big Scene size due to FSMs
« Reply #3 on: May 14, 2024, 09:26:56 AM »
More important is exported build size, not the file size shown in windows explorer. Also scene size likely increased if you have prefabs/textures/audio referenced in that scene, FSMs alone usually are not heavy.
Depending on platform look up for optimizing builds by compressing textures/audio in Unity's import settings (selecting an asset and look at inspector) and changing other project settings

I cannot be sure that the values in the attachment below are normal.

While even audio clips are 20MB, all Playmaker values exceed 100MB in total.
The game was made entirely with Playmaker.

Meka Games

  • Junior Playmaker
  • **
  • Posts: 61
Re: Big Scene size due to FSMs
« Reply #4 on: May 14, 2024, 06:49:33 PM »
The problem was with the references within the FSMs.

I fixed the loading time problem with Resource Load.

From 50 seconds to just 7 seconds.