Unity-Technologies / Unity.Animation.Samples

Repository of projects that showcase the new DOTS animation package (com.unity.animation).
Other
418 stars 78 forks source link

Null ref #18

Open spherous opened 4 years ago

spherous commented 4 years ago

Downloaded samples, added project to unity hub, opened it up in 2019.4.1f1 LTS, opened a scene, got this error. This does happen in all scenes.

NullReferenceException: Object reference not set to an instance of an object
UnityEngine.Rendering.HighDefinition.StaticLightingSky.UpdateCurrentStaticLightingSky () (at Library/PackageCache/com.unity.render-pipelines.high-definition@7.3.1/Runtime/Sky/StaticLightingSky.cs:127)
UnityEngine.Rendering.HighDefinition.StaticLightingSky.OnEnable () (at Library/PackageCache/com.unity.render-pipelines.high-definition@7.3.1/Runtime/Sky/StaticLightingSky.cs:184)

I went digging into StaticLightingSky.cs and found this on line 126/127

var defaultVolume = HDRenderPipeline.GetOrCreateDefaultVolume();
defaultVolume.sharedProfile.TryGet(skyType, out SkySettings defaultSky);

It seems defaultVolume.sharedProfile is null.

spherous commented 4 years ago

Over a week, no response from Unity. 5 months since last repo update. Is this repo dead? How are we supposed to learn the package with no working samples?

sky-higher commented 3 years ago

I think the model data is corrupt (almost nothing) and that's why you're getting the error. I have also checked the operation of the previous version and again, significant changes have been made. What I have learned is falling apart, but I still want to learn? The samples will work if you make the models look good. I don't know if I'm doing it wrong, but the textures won't be reflected and it's very slow, but I'm in URP. Sample

agotow commented 3 years ago

The repository isn't corrupted, it uses "git-lfs" to store large files (like models and textures).

Git (and by extension GitHub) doesn't work very well for large binary files like game assets, so the "LFS" (Large File Storage) extension is used in addition. Clicking "Download Repository" in GitHub will not pull down the large file assets. You will need to install both git and git-lfs on your machine and run them from the command line to re-inflate the repository.

Instructions on how to install git can be found here. Instructions on how to install git-lfscan be found here.

(If you're on a Mac, you can also use Homebrew to install git-lfs)

Once you've got both tools installed, cloning the repository through the command-line should automatically check out the large asset files, and everything will work fine 🙂