Both me and my colleague work on a Window Machine, the project was also developed on a windows machine.
Sorry I should be clearer, by modified I mean it marks the asset as modified for Perforce to pick up. With my experience with SetDirty function, it is possible that using it will mark it modified for Perforce to pick up even if there is no differences.
Here I have attached a dummy script that marks selected asset dirty:
using UnityEngine;
using UnityEditor;
public class MarkAssetDirty : MonoBehaviour
{
[MenuItem("Assets/Mark Selected Asset Dirty")]
private static void MarkSelectedAssetDirty()
{
Object selectedObject = Selection.activeObject;
if (selectedObject != null)
{
// Mark the selected object as dirty
EditorUtility.SetDirty(selectedObject);
// AssetDatabase.SaveAssets();
Debug.Log("Asset marked as dirty: " + selectedObject.name);
}
}
}
I have run this script on my prefab, which in perforce turning off line ending difference shows no changes,
and if I turn on line endings
but the asset is checked out