Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Terrain Paint Panel Fix

Chiusa Adatta ai principianti
#413 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
85/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp, game-dev
Ambito
devtools, game-dev

Direzione di ricerca

Il null dereference si trova in TerrainEditor.cs vicino alla riga 250, dove il sottopannello Paint legge data.Layers[i].Albedo per ogni layer di splat prima che sia stato assegnato un albedo. Apri una nuova scena, aggiungi un Terrain e apri il suo sottopannello Paint per riprodurre l'errore in console. Il lavoro è completato quando la sezione SPLAT LAYERS viene visualizzata senza il messaggio 'Drawing TerrainComponent threw' e le schermate prima e dopo del segnalatore descrivono il risultato atteso.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Description

The Terrain component has an error in the Paint sub-panel. It is looking for a thumbnail to display on a newly created terrain and returning an error and not rendering the Paint sub-panel property. This makes that part of the terrain system unusable.

Here is the error that is output constantly as long as the Pain sub panel is displayed:

[Inspector] Drawing TerrainComponent threw and was skipped: Object reference not set to an instance of an object.

To Reproduce
Steps to reproduce the behavior:

  1. Open a new Scene
  2. Add a Terrain object
  3. Scroll down and click on the Paint sub-panel of the Terrain component.
  4. The SPLAT LAYERS will be empty and nothing can be defined.
  5. The error will be visible on the output in the Console and on the terminal if you are running the app from the terminal.

Expected behavior
There should be a UI section with SPLAT LAYERS and the ability to use textures and colors.

The FIX

In TerrainEditor.cs on line 250 (of the latest code I have from 10/10/2026) The line:

var albThumb = EditorAssetBackend.Instance?.GetThumbnailTexture(data.Layers[i].Albedo.AssetID);

Can be replaced with the following lines to fix the issue:

//var albThumb = EditorAssetBackend.Instance?.GetThumbnailTexture(data.Layers[i].Albedo.AssetID);
// New terrain layers have no albedo yet. Don't dereference the texture until one is assigned.
var albThumb = data.Layers[i].Albedo is { } layerAlbedo
  ? EditorAssetBackend.Instance?.GetThumbnailTexture(layerAlbedo.AssetID)
  : null;

Screenshots
Here is a screenshot of the issue:
Paint Bug

Here is a screenshot after the fix above is applied:
Paint Fix

Lingua principale
C#
Stelle
1.3k
Fork
131
Merge medio
12h 12m
PR unite (30g)
20

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ProwlEngine/Prowl

Tutte le issue di ProwlEngine/Prowl

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.