Malevolent Planet Unity2d Day1 To Day3 Public Fixed Access

The game freezes during the "Planet Pulse" visual effect. The log shows: NullReferenceException: Transform child index out of range (MalevolentPlanetTerrain.cs)

The public build attempted to dynamically reparent corrupted tilemap chunks during the day transition. Due to Unity 2D’s Tilemap rendering order, the SetParent() method was being called on a Transform that was already queued for destruction by the garbage collector. Step-by-Step Fix: From Day 1 Failure to Day 3 Stability Here is the exact fix deployed by the community patch group. If you are reading this, you no longer have to scrap your project. Step 1: Locate the Offending Script Navigate to Assets/Scripts/Core/MalevolentPlanetTerrain.cs . Look for the TransitionToNextDay() method (usually lines 240–270 in the public build).

private IEnumerator DelayedReparent(GameObject chunk, GameObject targetParent, int day) malevolent planet unity2d day1 to day3 public fixed

if (corruptedChunks[i] == null

public void TransitionToNextDay()

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.

// Do not shift mood until after reparenting is queued. Invoke(nameof(ShiftPlanetMood), 0.1f); The game freezes during the "Planet Pulse" visual effect

public void OnBeforeSerialize()