public void SetObjectToBePlaced(GameObject selectedObject) { ClearBrush(); ui.AddMessageToBox("- Selected Object: " + selectedObject.name); hasObj = true; brushObject = selectedObject; objToPlace = selectedObject; SetTool("place"); }
private void MenuItemClicked(PolyAsset asset) { if (selectedAsset == asset) { return; } ui.AddMessageToBox(asset.displayName + " selected"); selectedAsset = asset; // Set options for import so the assets aren't crazy sizes PolyImportOptions options = PolyImportOptions.Default(); options.rescalingMode = PolyImportOptions.RescalingMode.FIT; options.desiredSize = 1.0f; options.recenter = true; PolyApi.Import(asset, options, ParseToGameObject); }