updated test scripts

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
This commit is contained in:
Guthrie Adams
2021-08-16 17:41:51 -05:00
parent c67a9f3d12
commit 7da5b032e7
2 changed files with 6 additions and 6 deletions
@@ -66,20 +66,20 @@ function FindMaterialAssignmentTest:OnActivate()
end
function FindMaterialAssignmentTest:UpdateFactor(assignmentId)
local propertyName = Name("baseColor.factor")
local propertyName = "baseColor.factor"
local propertyValue = math.random()
MaterialComponentRequestBus.Event.SetPropertyOverride(self.entityId, assignmentId, propertyName, propertyValue);
end
function FindMaterialAssignmentTest:UpdateColor(assignmentId, color)
local propertyName = Name("baseColor.color")
local propertyName = "baseColor.color"
local propertyValue = color
MaterialComponentRequestBus.Event.SetPropertyOverride(self.entityId, assignmentId, propertyName, propertyValue);
end
function FindMaterialAssignmentTest:UpdateTexture(assignmentId)
if (#self.Properties.Textures > 0) then
local propertyName = Name("baseColor.textureMap")
local propertyName = "baseColor.textureMap"
local textureName = self.Properties.Textures[ math.random( #self.Properties.Textures ) ]
Debug.Log(textureName)
local textureAssetId = AssetCatalogRequestBus.Broadcast.GetAssetIdByPath(textureName, Uuid(), false)
@@ -64,20 +64,20 @@ function PropertyOverrideTest:OnActivate()
end
function PropertyOverrideTest:UpdateFactor(assignmentId)
local propertyName = Name("baseColor.factor")
local propertyName = "baseColor.factor"
local propertyValue = math.random()
MaterialComponentRequestBus.Event.SetPropertyOverride(self.entityId, assignmentId, propertyName, propertyValue);
end
function PropertyOverrideTest:UpdateColor(assignmentId, color)
local propertyName = Name("baseColor.color")
local propertyName = "baseColor.color"
local propertyValue = color
MaterialComponentRequestBus.Event.SetPropertyOverride(self.entityId, assignmentId, propertyName, propertyValue);
end
function PropertyOverrideTest:UpdateTexture(assignmentId)
if (#self.Properties.Textures > 0) then
local propertyName = Name("baseColor.textureMap")
local propertyName = "baseColor.textureMap"
local textureName = self.Properties.Textures[ math.random( #self.Properties.Textures ) ]
Debug.Log(textureName)
local textureAssetId = AssetCatalogRequestBus.Broadcast.GetAssetIdByPath(textureName, Uuid(), false)