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

Changing Blit material in run time #5

Closed
gsm041039 opened this issue Jul 12, 2021 · 1 comment
Closed

Changing Blit material in run time #5

gsm041039 opened this issue Jul 12, 2021 · 1 comment

Comments

@gsm041039
Copy link

Hi, this feature is working fine on my project :)

but I want to ask if there have a way to change blit material in run time through script?
I am not familiar with scriptable render pipeline and I can't find any useful information about it.

It will be a big thanks if you can tell me about it!

@Cyanilux
Copy link
Owner

You can obtain a reference to the Blit feature by using a global field that you can set in the inspector.

public class Example : MonoBehaviour {

	public Blit blit;
	public Material newMaterial;

	public void Start() {
		blit.SetActive(true);
		blit.settings.blitMaterial = newMaterial;
	}
}

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