using UnityEngine; [System.Serializable] public class PlayerData : ISerializationCallbackReceiver
for (int i = 0; i < corruptedChunks.Length; i++) // Day 1 to Day 2: Fine. // Day 2 to Day 3: Explodes. corruptedChunks[i].transform.SetParent(malevolentCore.transform, true); StartCoroutine(ShiftPlanetMood());
The verified fix requires delaying the reparenting until the EndOfFrame and checking for null parents. This is now the standard patch for malevolent planet unity2d day1 to day3 public fixed . malevolent planet unity2d day1 to day3 public fixed
public void OnAfterDeserialize() Because Malevolent Planet relies heavily on Tilemap.renderer and SpriteShape , the public build suffered from memory spikes. Here is how to keep Days 1 through 3 running at 60 FPS. 1. Disable Unused Composite Colliders Between Day 1 and Day 2, the procedural corruption adds 500+ edge colliders. Fix: In the PlanetHeart script, add:
// If Day 3, we lock the pivot to avoid floating origin glitch. if (day >= 3) using UnityEngine; [System
private IEnumerator DelayedReparent(GameObject chunk, GameObject targetParent, int day) targetParent == null) yield break;
public void OptimizeCollision(int day)
This article is the official post-mortem fix guide. We will dissect exactly why the public build broke between Day 1 and Day 3, and provide the verified code patches that finally stabilize the transition. For those unfamiliar, Malevolent Planet uses a unique "Sentient Terrain" system. The ground itself has a NavMesh and an emotional stat (Sanity/Corruption). Between Day 1 (tutorial) and Day 3 (first boss encounter), a race condition occurs in the PlanetSentience coroutine.