// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
#pragma once
#include "Engine/Scripting/ScriptingObject.h"
#include "Engine/Content/AssetReference.h"
#include "Engine/Content/Assets/MaterialBase.h"
#include "Engine/Graphics/Enums.h"
///
/// The material slot descriptor that specifies how to render geometry using it.
///
API_CLASS(NoSpawn) class FLAXENGINE_API MaterialSlot : public PersistentScriptingObject
{
DECLARE_SCRIPTING_TYPE_WITH_CONSTRUCTOR_IMPL(MaterialSlot, PersistentScriptingObject);
///
/// The material to use for rendering.
///
API_FIELD() AssetReference Material;
///
/// The shadows casting mode by this visual element.
///
API_FIELD() ShadowsCastingMode ShadowsMode = ShadowsCastingMode::All;
///
/// The slot name.
///
API_FIELD() String Name;
public:
MaterialSlot(const MaterialSlot& other)
: MaterialSlot()
{
#if !BUILD_RELEASE
CRASH; // Not used
#endif
}
};