Exemplo n.º 1
0
    public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
    {
        var playable = ScriptPlayable <PointCloudBehaviour> .Create(graph, template);

        PointCloudBehaviour clone = playable.GetBehaviour();

        MarchingCubesManagerRef.defaultValue = FindObjectOfType(typeof(DensityFieldManager)) as DensityFieldManager;

        clone.MarchingCubesManagerRef = MarchingCubesManagerRef.Resolve(graph.GetResolver());

        clone.RegisterPointCloudClip();

        return(playable);
    }
Exemplo n.º 2
0
    public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
    {
        var playable = ScriptPlayable <PointCloudBehaviour> .Create(graph, template);

        PointCloudBehaviour clone = playable.GetBehaviour();

        //connect first marching cubes manager that is found in the scene
        DensityFieldManager[] managers = FindObjectsOfType(typeof(DensityFieldManager)) as DensityFieldManager[];

        if (managers.Length > 0)
        {
            MarchingCubesManagerRef.defaultValue = managers[0];
        }

        clone.MarchingCubesManagerRef = MarchingCubesManagerRef.Resolve(graph.GetResolver());

        clone.RegisterPointCloudClip();

        return(playable);
    }