> For the complete documentation index, see [llms.txt](https://docs.oserosuite.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.oserosuite.com/technical-notes/unreal-engine-notes/uproperties/getoptions-meta.md).

# GetOptions (meta)

Makes a FString input into a combo dropdown by defining a function to use to get the options. NOTE: The function has to be a UFUNCTION!

### Example <a href="#example" id="example"></a>

(From SHADERSOURCE: Texture Tools)

```cpp
class USH_TEX_Statics : public UBlueprintFunctionLibrary
{
	UFUNCTION()
		static TArray<FString> GetSamplerNames();
}

class USH_TEX_Job_AIGeneration : public USH_TEX_TextureJob
{
	UPROPERTY(EditAnywhere, Category = "Sampler", meta = (GetOptions = "SH_TEX_Statics.GetSamplerNames"))
		FString Sampler = "euler";
}
```

<figure><img src="/files/Rqm2sbeAJA8TbayL3tY2" alt=""><figcaption></figcaption></figure>

Note: If **GetOptions** is used in a struct and there is no leading class name (eg, "GetAIWorkFlows" rather than "USH\_TEX\_Job\_AIGeneration.GetAIWorkFlows", the code will look up to the struct's parent recursively until it finds a UFUNCTION definition that matches its name.\
That way the **GetOptions** function does not have to be static, it can be an instance of an object.

```cpp
struct FSH_TEX_AISettings_Workflow
{
	/* Which ComfyUI workflow to use (drop down of all ComfyUI Workflows included in this plugin). */
	UPROPERTY(EditAnywhere, Category = "Workflow", meta = (GetOptions = "GetAIWorkFlows"))
		FString Workflow = SH_TEX::DefaultWorkflow;
};

class USH_TEX_Job_AIGeneration : public USH_TEX_TextureJob
{
	UPROPERTY(EditAnywhere, Category = "Workflow")
		FSH_TEX_AISettings_Workflow WorkflowSettings = FSH_TEX_AISettings_Workflow();
		
	UFUNCTION(BlueprintPure, Category = "AI Job")
		TArray<FString> GetAIWorkFlows();
}
```

### Reference

{% embed url="<https://unreal-garden.com/docs/uproperty/#getoptions>" %}
