//============================================================================//
#if UNITY_EDITOR
        // INITIALIZE //
        //
        override public void Initialize(BaseStack theOwnerStack, AmpsBlueprint theOwnerBlueprint)
        {
            base.Initialize(theOwnerStack, theOwnerBlueprint);

            subMenuName = AmpsHelpers.formatEnumString(eCategories.OtherObjects.ToString());
            type        = "Transform sampler";
            SetDefaultName();

            sampledObject = ScriptableObject.CreateInstance <GameObjectProperty>();
            sampledObject.Initialize("Object", null, theOwnerBlueprint);
            sampledObject.SetDataModes(false, false, false, false, false, true);
            AddProperty(sampledObject, false);
            sampledTransformElement = ScriptableObject.CreateInstance <DropdownProperty>();
            sampledTransformElement.Initialize("Transform", 0, theOwnerBlueprint);
            AddProperty(sampledTransformElement, true);
            implementsVisualization = false;
        }
Пример #2
0
//============================================================================//
#if UNITY_EDITOR
        // INITIALIZE //
        //
        override public void Initialize(BaseStack theOwnerStack, AmpsBlueprint theOwnerBlueprint)
        {
            base.Initialize(theOwnerStack, theOwnerBlueprint);

            subMenuName = AmpsHelpers.formatEnumString(eCategories.OtherObjects.ToString());
            type        = "Volume sampler";
            SetDefaultName();

            sampledObject = ScriptableObject.CreateInstance <GameObjectProperty>();
            sampledObject.Initialize("Object", null, theOwnerBlueprint);
            sampledObject.SetDataModes(false, false, false, false, false, true);
            AddProperty(sampledObject, false);
            insideValue = ScriptableObject.CreateInstance <VectorProperty>();
            insideValue.Initialize("Value if inside", Vector4.one, theOwnerBlueprint);
            insideValue.SetConversionMode(theOwnerStack.stackFunction);
            insideValue.SetDefaultCoordSystem(theOwnerStack.stackFunction);
            AddProperty(insideValue, true);
            outsideValue = ScriptableObject.CreateInstance <VectorProperty>();
            outsideValue.Initialize("Value if outside", Vector4.one, theOwnerBlueprint);
            outsideValue.SetConversionMode(theOwnerStack.stackFunction);
            outsideValue.SetDefaultCoordSystem(theOwnerStack.stackFunction);
            AddProperty(outsideValue, true);
            implementsVisualization = false;
        }