Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullReferenceException #28

Open
danksup opened this issue Sep 27, 2020 · 2 comments
Open

NullReferenceException #28

danksup opened this issue Sep 27, 2020 · 2 comments

Comments

@danksup
Copy link

danksup commented Sep 27, 2020

Hi, im currently at the last episode, and i got this error everytime im messing around with texture layers. any solution?
This is the error that i got:

NullReferenceException
UnityEngine.Texture.get_width () (at :0)
UnityEngine.Texture2D.GetPixels (System.Int32 miplevel) (at :0)
UnityEngine.Texture2D.GetPixels () (at :0)
TextureData.GenerateTextureArray (UnityEngine.Texture2D[] textures) (at Assets/script/Procedural Landmass Generation/Data/TextureData.cs:46)
TextureData.ApplyToMaterial (UnityEngine.Material material) (at Assets/script/Procedural Landmass Generation/Data/TextureData.cs:26)
MapPreview.OnTextureValuesUpdated () (at Assets/script/Procedural Landmass Generation/MapPreview.cs:83)
UpdatableData.NotifyOfUpdatedValues () (at Assets/script/Procedural Landmass Generation/Data/UpdatableData.cs:21)
UpdatableDataEditor.OnInspectorGUI () (at Assets/script/Procedural Landmass Generation/Editor/UpdatableDataEditor.cs:17)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.b__0 () (at <67055f1be3654e2a987254d5437ee5b8>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

@OfficialSammyTheWolf
Copy link

hello, i have the same issue, i tried everything and i would like any help, so if you have discord could you DM me when you will find the solution please ? because i'm not 24/7 on GitHub and i would probably found the solution after i fixed it myself. Thanks (If you don't have discord here is my twitter https://twitter.com/SammytheWolf5)

@OfficialSammyTheWolf
Copy link

ok, i found what was wrong with my error, i removed the texture fro mthe texture slot so it didn't had texture and that's why the error was there, try adding the texture to the texture slot and then update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants