Esempio n. 1
0
	public void Start() 
	{
		//Debug.Log( "ExampleScript: Start" );

		parmIndex = 0;
		parmNames = null;
		myAsset = null;
		parmName = "";
		parmSize = 0;
		parmType = HoudiniAssetAccessor.ParmType.INVALID;
		parmIntValue = null;
		parmFloatValue = null;
		parmStringValue = null;

		// If the game object has a HAPI_Asset component then get
		// the parameters for this asset and set the selected
		// parameter to be the asset's first parameter
		myAsset = HoudiniAssetAccessor.getAssetAccessor( gameObject );
		if ( myAsset != null )
		{
			Debug.Log( "Asset name: " + myAsset.prName );
			parmNames = myAsset.getParameters();
			setSelectedParameter();
		}
	}
    public void Start()
    {
        //Debug.Log( "ExampleScript: Start" );

        parmIndex       = 0;
        parmNames       = null;
        myAsset         = null;
        parmName        = "";
        parmSize        = 0;
        parmType        = HoudiniAssetAccessor.ParmType.INVALID;
        parmIntValue    = null;
        parmFloatValue  = null;
        parmStringValue = null;

        // If the game object has a HAPI_Asset component then get
        // the parameters for this asset and set the selected
        // parameter to be the asset's first parameter
        myAsset = HoudiniAssetAccessor.getAssetAccessor(gameObject);
        if (myAsset != null)
        {
            Debug.Log("Asset name: " + myAsset.prName);
            parmNames = myAsset.getParameters();
            setSelectedParameter();
        }
    }
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Public Methods

    // Static methods used to get HAPI_AssetAccessor(s) -------------------------------------------------------------

    public static HoudiniAssetAccessor[] getAllAssetAccessors()
    {
        HoudiniAsset[]         assets    = UnityEngine.Object.FindObjectsOfType(typeof(HoudiniAsset)) as HoudiniAsset[];
        HoudiniAssetAccessor[] accessors = new HoudiniAssetAccessor[assets.Length];

        for (int i = 0; i < assets.Length; i++)
        {
            accessors[i] = new HoudiniAssetAccessor(assets[i]);
        }

        return(accessors);
    }
Esempio n. 4
0
	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Public Methods

	// Static methods used to get HAPI_AssetAccessor(s) -------------------------------------------------------------

	public static HoudiniAssetAccessor[] getAllAssetAccessors()
	{
		HoudiniAsset[] assets = UnityEngine.Object.FindObjectsOfType( typeof( HoudiniAsset ) ) as HoudiniAsset[];
		HoudiniAssetAccessor[] accessors = new HoudiniAssetAccessor[ assets.Length ];

		for ( int i = 0; i < assets.Length; i++ )
		{
			accessors[ i ] = new HoudiniAssetAccessor( assets[ i ] );
		}

		return accessors;
	}