Closed snarlynarwhal closed 8 years ago
Hi, first, you don't need (must not) create the ITypeDeclaration (yourself). The documentation is in one regard outdated, as it refers to the master branch. There were changes so it does not fully apply to the develop branch:/ Though a way improved documentation is waiting to be published once the merge of master and develop is performed:) For your problem, you need to extend IConnectionTypeDeclaration. It's essentially the same but names have changed. For a detailed overview, take a look at ConnectionTypes.cs in the develop branch. At the very bottom, you see the new IConnectionTypeDeclaration and the default float type.
Everything else of your code seems fine:)
Ahh, you're the man - thanks for the quick replies! :D
No problem, thanks:)
In the new version, where are the ITypeDeclarations and the types declared?
I'm having trouble implementing custom connection types. The current documentation seemed quite straightforward and simple, but I keep getting an error.
Basically, I need the output of a node to be a custom component reference which I assign in the inspector.
1) Made Machine Node (assign Machine component in inspector)
2) Created ITypeDeclaration Interface ` using UnityEngine; using System;
public interface ITypeDeclaration {
} `
3) Created MachineType ` using UnityEngine; using System;
public class MachineType : ITypeDeclaration {
} `
4) In my MachineNode Create method, I have this line:
node.CreateOutput("Machine", "Machine");
5) I get this error:
Maybe I'm misunderstanding this completely, but is it possible to do what I'm trying to do? Thanks ahead for the help!