Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set Installed to false inside uplugin #31

Merged
merged 1 commit into from
Sep 25, 2023
Merged

Conversation

linqen
Copy link
Contributor

@linqen linqen commented Aug 30, 2023

This will avoid the engine asking every time you open it to update the uproject file with the new plugins.

If we update the project file with this change, not having the plugin installed will block other team members to build the game because the missing dependency.

This plugin is a Tool, but not a requirement, so it shouldn't be a dependency, therefore it shouldn't be added to .uproject by default

This will avoid the engine asking every time you open it to update the uproject file with the new plugins.

If we update the project file with this change, not having the plugin installed will block other team members to build the game because the missing dependency.

This plugin is a Tool, but not a requirement, so it shouldn't be a dependency, therefore it shouldn't be added to .uproject by default
@linqen
Copy link
Contributor Author

linqen commented Sep 13, 2023

@LukaszMendakiewicz @DavidARaygoza Hey, this is a small fix/improvement that is affecting my team and I'm very sure a lot of people using it. Could you take a look at it please? :)

@LukaszMendakiewicz
Copy link
Contributor

Hey @linqen - thanks for the ping and apologies for the delay.
I am not sure of the full implications of this change - the documentation is quite light on the property - so I would prefer to hold a little more for @hnrqbaggio to take a look once he is back from the break. We should be able to circle back to you by the end of the month.

@linqen
Copy link
Contributor Author

linqen commented Sep 13, 2023

Great, thank you very much for your answer on this.

The best information I could find about this is this:

In GameProjectUtils.cpp::CheckForOutOfDateGameProjectFile(), it will check for out of date game project file, and decides that based on Plugin->GetDescriptor().bInstalled

// Check if there are any installed plugins that need to be added as a reference
TArray<FPluginReferenceDescriptor> NewPluginReferences = Project->Plugins;

for(TSharedRef<IPlugin>& Plugin: IPluginManager::Get().GetEnabledPlugins())
{
	if(Plugin->GetDescriptor().bInstalled && Project->FindPluginReferenceIndex(Plugin->GetName()) == INDEX_NONE)
	{
		FPluginReferenceDescriptor PluginReference(Plugin->GetName(), true);
		NewPluginReferences.Add(PluginReference);
		bRequiresUpdate = true;
	}
}

FindPluginReferenceIndex will try to find this plugin by name on the already added plugins.
Most of the plugins I found around the engine, are Installed = false.

I hope this helps!

Copy link
Contributor

@hnrqbaggio hnrqbaggio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution, @linqen.

I've looked at the docs and the code that is using the field. It seems indeed that for our case it should be set to false.

Approved.

@hnrqbaggio hnrqbaggio merged commit c4a9572 into microsoft:main Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants