Forum rules - please read before posting.

Interactive cloth

Im trying the very latest unity beta Unity 2017.1.0b1 (64-bit) and getting this error :

Assets/AdventureCreator/Scripts/Game engine/SceneSettings.cs(257,4): error CS0246: The type or namespace name `InteractiveCloth' could not be found. Are you missing an assembly reference?

Any thoughts?


  • I didn't think Adventure Creator had anything to do with cloth physics at all, and especially not in a scene settings script. Try re-importing Adventure Creator (make a backup though).
  • Well, I also don't see why it would reference that class. 
    But if it does, it could be that Unity has renamed the class. If that's the case then the code will need some tweaking to get it to work.
  • edited April 2017
    From what I've heard, the UNITY_5 include guard no longer works with versions later than Unity 5.6 and there's actually a block of code dealing with InteractiveCloth in that section of the file.

    They've probably moved it to a new namespace ... :-/

    EDIT: it seems that InteractiveCloth went away with Unity 4 (I never used it), the problem is that the UNITY_5 preprocessor directive no longer works with Unity 2017:

  • edited April 2017
    Looks like we could be entering interesting times - I'm still trying to convince a number of authors of other assets that they should fix deprecation warnings in 5.6  ...
  • It should be safe to remove the offending lines, but there will probably be other issues after that. AC uses #if !UNITY_5 in other parts of the code as well, so I guess you'll have to deal with that through local modifications until Unity 2017 is out of beta.
  • edited April 2017
    I commented out anythign to do with interactive cloth and its working, one weird thing is now adventure creator constantly asks me if it can set layers, even when I let it, it is still asking. I am using Unity 2017.1.0b1 so I think its fair to say some stuff has changed, and I am on an older AC 1.54c IIRC, I will try upgrading AC too. Unity is so full of bugs these days its amazing everyone hasnt given up on it. 
  • Well, to be fair, you are using a beta version which just came out (and everyone agrees, is awefully buggy yet, lol). In comparison the Timeline preview build, based on a more mature version of 5.6 beta, was already pretty stable. But as 2017.1 beta just came out, we'll have to wait a couple of weeks, if not months, for it to get stable enough for projects (if what you want is to use Timeline maybe you could try the preview build? I'm using it in some projects and it's pretty good, though, it's not up to date to the recently relased Unity 5.6). 

    I'm personally dying to use 2017.1 beta, but I'll wait for a few weeks (let everyone else deal with the worst bugs, lol).
  • Yeh well 5.6 had bugs I couldnt live with. My main issue right now is its killing me that AC constantly asks to make layers, how can I stop it doing that ?
  • edited April 2017
    Did you already try the  patch releases for Unity 5.6? Extra fixes usually have to be installed using those. They don't come in the main build because some of those errors don't happen to everyone.
  • Regarding the layers thing, I can see there are quite a few #if UNITY_5 blocks in the code dealing with this in ACInstaller.cs.

    The conclusion must be that AC just isn't compatible with Unity 2017 yet.
  • I wish Unity would actually build commercial games with their engine - then they'd get first hand experience of the process, discovering & prioritizing bugs and their eventual fixes. While I'm not a fan of any Epic games, at least the company create games on the engine they're building and promoting.

    That being said, I'm still on 5.5 here and all seems fine to be honest - unless there's something I don't know about?

  • Yes it would certainly help, I dont think Unity is really that capable of producing a semi large game, everything drags and constantly causes issues. If I ever get through this my next game will probably be scaled down. Using so many assets together causes a ton of issues too.. That said Unity is managing to almost cope so I hold out some hope for the future :)

    Thanks for the answers guys.
  • edited May 2017
    Could you elaborate on the "asking for layers" issue, @radiantboy?  If you allow the installer to create them automatically, it should be aware of this.

    AC's reference to InteractiveCloth is to fix an issue when pausing the game while cloths are active.  As Unity 2017 is still early in development, and not officially released yet, AC cannot guarantee support for it.  I do, however, intend to sort out the preprocessor issues in the next release so that it can at least compile.
  • @radianboy the problem is that a few code blocks in that file expect unity 5, because it's not unity 5 it's trying to run code for legacy Unity versions. So for now you can open the ACInstaller.cs and then look for any:

    #if UNITY_5 

    and replace it for  

    #if UNITY_2017_1_OR_NEWER

    it just won't work with Unity 5 anymore though. Sadly define directives don't seem to have "or" operators so extra if blocks will be needed to support both unity 5 and 2017 (and legacy). There may be other places with the same error, but that clears the layer popup issue (if you are in a hurry to test).
  • Oh, doh. Maybe typing UNITY_5_OR_NEWER will do instead (I think the or_newer thing should work for every version).
  • edited May 2017
    Unity didn't introduce the "_OR_NEWER" until 5.3, unfortunately, which is why the "UNITY_5" is still present in the code.

    Directives do have an "or", however:

    #if UNITY_5 || UNITY_2017_1_OR_NEWER

    There's a few more changes to make, however.  These changes will be made in the next official AC release, so I would recommend waiting for that instead of changing the code manually.  I should still emphasise that until Unity 2017 is complete, AC will not guarantee support for it.
  • edited May 2017
    Oh, cool! lol I didn't see it, or missed it, in Unity's example page, sorry. That's why I though maybe it wasn't possible to use || (and I prefer to be safe than sorry, lol). Anyway, let us know when there's any update, I'm also dying to use the current 2017.1, heh. I could do some testing if you need help, lol. But, anyway, I know proper compatibility won't be guaranteed until 2017.1 is out of beta, but I won't be upgrading the 2017.1 beta version I just donwloaded too often (if at all), so I'll give it a go :) 

    I'm dying to test AC with Cinemachine 2.0 (Adam Myhill kindly gave us in the forums an ahead of time release :) )
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.