# 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>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.oserosuite.com/technical-notes/unreal-engine-notes/uproperties/getoptions-meta.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
