How to change a material offset in HDRP material shader type?Texture/Material to a Prefab in Unity 3D Not WorkingHow to change materials in UnityUnable to animate or change color in custom shader in Unity?Material changes from editor script are lost on saveUnity relative directions in shaderHow to access custom shader properties and fields via GetProperties / PropertyInfo?Referencing and changing a material on a meshrenderer in unityChanging Sprite material at runtime not applied?AR Core in Unity: How to change surface shader material to support normal maps?Why isn't the 2nd material showing up?
Are differences between uniformly distributed numbers uniformly distributed?
In SQL Server, why does backward scan of clustered index cannot use parallelism?
Why does Intel's Haswell chip allow FP multiplication to be twice as fast as addition?
Can the ground attached to neutral fool a receptacle tester?
Acceptable to cut steak before searing?
During the Space Shuttle Columbia Disaster of 2003, Why Did The Flight Director Say, "Lock the doors."?
Tikzpicture - finish drawing a curved line for a cake slice
What should I call bands of armed men in Medieval Times?
As a 16 year old, how can I keep my money safe from my mother?
Is it okay for a ticket seller to grab a tip in the USA?
How can Radagast come across Gandalf and Thorin's company?
Email address etiquette - Which address should I use to contact professors?
Should you play baroque pieces a semitone lower?
Blocking people from taking pictures of me with smartphone
Trying to write a shell script that keeps testing a server remotely, but it keeps falling in else statement when I logout
Bitcoin successfully deducted on sender wallet but did not reach receiver wallet
First amendment and employment: Can a police department terminate an officer for speech?
Continuous vertical line using booktabs in tabularx table?
Plausibility of Ice Eaters in the Arctic
Three legged NOT gate? What is this symbol?
The cat ate your input again!
I accidentally overwrote a Linux binary file
What is the difference between 型 and 形?
Does this Foo machine halt?
How to change a material offset in HDRP material shader type?
Texture/Material to a Prefab in Unity 3D Not WorkingHow to change materials in UnityUnable to animate or change color in custom shader in Unity?Material changes from editor script are lost on saveUnity relative directions in shaderHow to access custom shader properties and fields via GetProperties / PropertyInfo?Referencing and changing a material on a meshrenderer in unityChanging Sprite material at runtime not applied?AR Core in Unity: How to change surface shader material to support normal maps?Why isn't the 2nd material showing up?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I was using Unity in 3D mode than I had to change to HDRP:
rend.material.mainTextureOffset
and
rend.material.SetTextureOffset
were working normally but when upgraded to HDRP, they were not affecting the variables and not changing the scene so I thought they could have another parameter name or function.
To change the color of the material I had to change from: rend.material.SetColor("_Color", colors[0]);
to rend.material.SetColor("_BaseColor", colors[0]);
unity3d
add a comment |
I was using Unity in 3D mode than I had to change to HDRP:
rend.material.mainTextureOffset
and
rend.material.SetTextureOffset
were working normally but when upgraded to HDRP, they were not affecting the variables and not changing the scene so I thought they could have another parameter name or function.
To change the color of the material I had to change from: rend.material.SetColor("_Color", colors[0]);
to rend.material.SetColor("_BaseColor", colors[0]);
unity3d
It depends on what shaders you're using. Some shaders don't use texture offsets. You can see the supported properties if you look at the material in debug mode. docs.unity3d.com/Manual/InspectorOptions.html
– artcorpse
Mar 27 at 9:36
add a comment |
I was using Unity in 3D mode than I had to change to HDRP:
rend.material.mainTextureOffset
and
rend.material.SetTextureOffset
were working normally but when upgraded to HDRP, they were not affecting the variables and not changing the scene so I thought they could have another parameter name or function.
To change the color of the material I had to change from: rend.material.SetColor("_Color", colors[0]);
to rend.material.SetColor("_BaseColor", colors[0]);
unity3d
I was using Unity in 3D mode than I had to change to HDRP:
rend.material.mainTextureOffset
and
rend.material.SetTextureOffset
were working normally but when upgraded to HDRP, they were not affecting the variables and not changing the scene so I thought they could have another parameter name or function.
To change the color of the material I had to change from: rend.material.SetColor("_Color", colors[0]);
to rend.material.SetColor("_BaseColor", colors[0]);
unity3d
unity3d
edited Mar 27 at 9:12
Markoorn
1,2851 gold badge9 silver badges18 bronze badges
1,2851 gold badge9 silver badges18 bronze badges
asked Mar 27 at 8:32
Adib RachidAdib Rachid
265 bronze badges
265 bronze badges
It depends on what shaders you're using. Some shaders don't use texture offsets. You can see the supported properties if you look at the material in debug mode. docs.unity3d.com/Manual/InspectorOptions.html
– artcorpse
Mar 27 at 9:36
add a comment |
It depends on what shaders you're using. Some shaders don't use texture offsets. You can see the supported properties if you look at the material in debug mode. docs.unity3d.com/Manual/InspectorOptions.html
– artcorpse
Mar 27 at 9:36
It depends on what shaders you're using. Some shaders don't use texture offsets. You can see the supported properties if you look at the material in debug mode. docs.unity3d.com/Manual/InspectorOptions.html
– artcorpse
Mar 27 at 9:36
It depends on what shaders you're using. Some shaders don't use texture offsets. You can see the supported properties if you look at the material in debug mode. docs.unity3d.com/Manual/InspectorOptions.html
– artcorpse
Mar 27 at 9:36
add a comment |
1 Answer
1
active
oldest
votes
It worked by using the same function but changing the attribute name to
_BaseColorMap
rend.material.SetTextureOffset(
"_BaseColorMap",
new Vector2(offset_x,offset_y));
and worked perfectly!
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55372756%2fhow-to-change-a-material-offset-in-hdrp-material-shader-type%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
It worked by using the same function but changing the attribute name to
_BaseColorMap
rend.material.SetTextureOffset(
"_BaseColorMap",
new Vector2(offset_x,offset_y));
and worked perfectly!
add a comment |
It worked by using the same function but changing the attribute name to
_BaseColorMap
rend.material.SetTextureOffset(
"_BaseColorMap",
new Vector2(offset_x,offset_y));
and worked perfectly!
add a comment |
It worked by using the same function but changing the attribute name to
_BaseColorMap
rend.material.SetTextureOffset(
"_BaseColorMap",
new Vector2(offset_x,offset_y));
and worked perfectly!
It worked by using the same function but changing the attribute name to
_BaseColorMap
rend.material.SetTextureOffset(
"_BaseColorMap",
new Vector2(offset_x,offset_y));
and worked perfectly!
edited Mar 28 at 10:28
ssice
2,3711 gold badge18 silver badges30 bronze badges
2,3711 gold badge18 silver badges30 bronze badges
answered Mar 28 at 9:44
Adib RachidAdib Rachid
265 bronze badges
265 bronze badges
add a comment |
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55372756%2fhow-to-change-a-material-offset-in-hdrp-material-shader-type%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
It depends on what shaders you're using. Some shaders don't use texture offsets. You can see the supported properties if you look at the material in debug mode. docs.unity3d.com/Manual/InspectorOptions.html
– artcorpse
Mar 27 at 9:36