Memory โ
Everything you build ends up inside Second Life scripts, and scripts have a hard limit of 64 KB. To keep your HUD from crashing, the panel measures your project in memory units and refuses to save past your plan's limit. The Script Memory bar in the left column shows where you are.
Limits โ
| Plan | Limit | In practice |
|---|---|---|
| FREE | 5,100 units | A texture HUD with around 25โ40 simple buttons |
| PRO | 60,000 units | Hundreds of functions; you rarely think about it |
The panel allows a small tolerance (500 units) beyond the limit before it refuses to save. Each single function is capped at 1,200 units of actions.
What costs memory โ
| Item | Cost |
|---|---|
| Every function (button, event or helper) | 30 units base |
| Every event | 30 units base |
| Every variable | 30 units |
| Every action | see the table below |
| Message text | +1 unit per character |
| Blinn-Phong advanced properties | a few units per changed value |
| Assets, targets, groups, UI positions | 0 |
Cost of each action โ
| Action | Category | Plan | Memory | Notes |
|---|---|---|---|---|
| Object Control | PRO | 400 | ||
| Sound, Chat & Animation | PRO | 200 | ||
| Textures & Materials | FREE | 85 | ||
| Textures & Materials | FREE | 70 | Advanced properties add a few units for each changed value. | |
| Sound, Chat & Animation | FREE | 70 | +1 unit per character of the message. | |
| Move & Resize | FREE | 50 | ||
| Move & Resize | PRO | 50 | ||
| Move & Resize | PRO | 50 | ||
| Move & Resize | PRO | 50 | ||
| Color & Light | FREE | 40 | ||
| Color & Light | PRO | 40 | ||
| Sound, Chat & Animation | PRO | 40 | ||
| Sound, Chat & Animation | PRO | 40 | ||
| Flow & Logic | FREE | 40 | ||
| Textures & Materials | FREE | 30 | ||
| Textures & Materials | PRO | 30 | ||
| Color & Light | PRO | 30 | ||
| Color & Light | PRO | 30 | ||
| Flow & Logic | PRO | 30 | ||
| Flow & Logic | PRO | 30 | ||
| Sound, Chat & Animation | FREE | 25 | ||
| Flow & Logic | PRO | 25 | ||
| Textures & Materials | PRO | 20 | ||
| Move & Resize | PRO | 20 | ||
| Object Control | PRO | 20 | ||
| Object Control | PRO | 20 | ||
| Textures & Materials | PRO | 15 | ||
| Color & Light | FREE | 15 | ||
| Flow & Logic | FREE | 10 |
Reading the numbers โ
A 20-button texture HUD, one Blinn-Phong action each:
20 functions ร 30 = 600
20 Blinn-Phong ร 70 = 1,400
Attach event (empty) = 30
โโโโโ
2,030 units โ fits FREE (5,100)The same HUD with a click sound and a message in every button:
20 ร (30 + 70 + 25 + 70 + ~20 chars) โ 4,300 units โ close to the FREE limitWith a helper fx_click holding sound + message, called from each button:
helper: 30 + 25 + 70 + 20 = 145
20 ร (30 + 70 + 30 [activate]) = 2,600
โโโโโ
2,745 unitsHow to save memory โ
- Helper functions for anything repeated (Helper Functions).
- Short messages. Every character counts.
ALLfaces / ALL LINKS instead of several actions for individual faces, when the result is the same.- Delete unused functions and events. An empty event still costs 30.
- Few variables. Each one is 30 units, and they are only needed for logic.
- Open URL is expensive (200). One link button is fine; twenty are not, on FREE.
Memory inside Second Life โ
The panel's units are an estimate of the bytes the scripts will hold. The real scripts (*FUNCTIONS, *TARGETS, PBR Manager) run close to their 64 KB ceiling by design, which is why the limits exist. If you ever see a Stack-Heap Collision error from a 1Click script in-world, the object holds more than it can handle: reduce the project and build again, and tell us about it.