Creates a resource reference using a resource ID.
public void Execute(PluginCommandParameter parameter)
{
var imageDirectory = studio.ActiveProject.ImageDirectory;
var defaultTextureImage = imageDirectory.GetItemByName("DefaultTextureImage.png") as ImageFile;
var textureLibrary = studio.ActiveProject.TextureLibrary;
var myTexture = studio.ActiveProject.CreateProjectItem<SingleTexture>(textureLibrary.GenerateUniqueChildName("My Texture"), textureLibrary);
myTexture.Set(myTexture.PropertyTypes.TextureImage, defaultTextureImage);
var screenNode = studio.ActiveProject.GetProjectItem("Screens/Screen/") as Node;
screenNode.ResourceDictionary.CreateResourceEntry("ResourceIDOfMyTexture", myTexture);
var rootPage = studio.ActiveProject.GetProjectItem("Screens/Screen/RootPage");
var imageNode = studio.ActiveProject.CreateProjectItem<Image2D>(rootPage.GenerateUniqueChildName("Image"), rootPage);
imageNode.Set(Properties.Image2DImage, new ResourceReference<Texture>("ResourceIDOfMyTexture"));
}