Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Editor view becomes all black #5

Open
dampete opened this issue May 2, 2022 · 1 comment
Open

Editor view becomes all black #5

dampete opened this issue May 2, 2022 · 1 comment

Comments

@dampete
Copy link

dampete commented May 2, 2022

Using Unity 2021.3 the effect works as expected, however the Scene view doesn't render (becomes all black, tried disabling all sorts of layers), I have to disable Sun Shaft Feature to be able to see my scene in Scene view, so basically I only enable it before generating a build.

Off topic: not sure where I can ask this, but could the sun position parameter be linked to an object (maybe move it to the material...)?

@andrewspalato
Copy link

andrewspalato commented Aug 10, 2022

Similar thing happens to me here: https://github.com/ryanslikesocool/URP-Sun-Shafts/issues/4
The original author has not got back to us. I really hope there is an update for this soon.

To access the sun position:

[SerializeField] private UniversalRendererData forwardRendererData;
private List<ScriptableRendererFeature> features;
private SunShaftFeature sunShafts;

private void Start()
{
    features = forwardRendererData.rendererFeatures;

			for (int i = 0; i < features.Count; i++)
			{
				if (features[i].GetType() != typeof(SunShaftFeature)) continue;
				sunShafts = (SunShaftFeature)features[i];
				break;
			}

    sunShafts.Position = // Change the position of the sun shafts here.
}

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

No branches or pull requests

2 participants