Announcement

Collapse
No announcement yet.

How to dependency plugin in another plugin?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to dependency plugin in another plugin?

    I have wrote two plugins,and one of them need the module in another. I have tried to add the module in build files,but it always warn that module dependency but plugins not.
    And another problem is that when I package one of that,it always told that can not find head files which is in the other plugin

    #2
    Plugins should not depend on other plugins. Combine them into a single plugin when needed.

    Comment


      #3
      I've added plugins to a .UPLUGIN definition, works fine and packages.

      For reference :

      https://github.com/midgen/cashgenUE/...ashGen.uplugin

      Has dependencies on UnrealFastNoise and the RMC.

      Comment


        #4
        Originally posted by mid_gen View Post
        I've added plugins to a .UPLUGIN definition, works fine and packages.

        For reference :

        https://github.com/midgen/cashgenUE/...ashGen.uplugin

        Has dependencies on UnrealFastNoise and the RMC.
        I am also write the .uplugin as the same as you.But it will meet erro when package it.

        Comment


          #5
          Originally posted by GBX_botman View Post
          Plugins should not depend on other plugins. Combine them into a single plugin when needed.
          But there was something wrong if you use two plugins at the same times if combine them into a single.
          like this :
          if PluginA contain PluginB.and then B can not use which the project used A,

          Comment


            #6
            PluginA must be loaded as PreDefault, PluginB loaded on Default phase.

            A cannot depend on B, but B referencing A works fine.
            | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

            Comment


              #7
              Originally posted by BrUnO XaVIeR View Post
              PluginA must be loaded as PreDefault, PluginB loaded on Default phase.

              A cannot depend on B, but B referencing A works fine.
              But how are plugin's load phases set? I only know of setting the load phase on modules, not plugins, which are just listed as "enabled".

              Comment


                #8
                Plugins are modules.
                You define its modules names and loading phase within uplugin file.
                | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                Comment


                  #9
                  Originally posted by BrUnO XaVIeR View Post
                  Plugins are modules.
                  You define its modules names and loading phase within uplugin file.
                  So if Plugin B depends on Plugin A, I have to open up the .uplugin of Plugin A, set all its modules to "PreDefault", open up the .uplugin of Plugin B and set all its modules to Default basically?

                  Comment


                    #10
                    In short yes, but things can get more complex than that when you are dealing with plugins that contain multiple modules.
                    One plugin can have many modules and its own chain of internal dependencies.

                    After you do that you have to include the dependency to B's Build.cs file as well.
                    | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                    Comment


                      #11
                      Originally posted by BrUnO XaVIeR View Post
                      In short yes, but things can get more complex than that when you are dealing with plugins that contain multiple modules.
                      One plugin can have many modules and its own chain of internal dependencies.

                      After you do that you have to include the dependency to B's Build.cs file as well.
                      Yeah that's the issue I face.
                      Plugin A is an open source plugin provided by a company, and my plugin (B) requires it to work. Both plugins have two modules each, one for runtime, one for editor, so both plugin's editor modules depend on their respective runtime modules as well.
                      While I could make changes to Plugin A, I'd rather not fiddle around too much since it's not granted that the company will accept a merge request (I think they would though).

                      How would one go about this though? Since there aren't an endless amount of phases.

                      Comment


                        #12
                        Originally posted by Bruce_Oases View Post

                        I am also write the .uplugin as the same as you.But it will meet erro when package it.
                        I also have the same problem ,while I resolve it by write plugin dependency info in .uplugin file like the github hyperlink .

                        As far as I am concerned , you are not the same reason cause the erro ,maybe u include an "Editor" plugin , The plugin includes a lot editor functions which can only run in editor mode.so it has erro. If I am right. The only solution maybe convert the functions of the plugin you use to "Runtime" Functions in a new Custom Plugin!
                        I hope it helps!

                        Comment

                        Working...
                        X